Showing posts with label vwd. Show all posts
Showing posts with label vwd. Show all posts

Wednesday, March 7, 2012

Connection to database on a remote server

Here is my environment and problem:

I have VWD 2005 and SSE 2005 installed on my local machine. I also have these installed on my Windows 2003 Server. I developed my database using SSE on my local machine but pointing to directory on my server. I have been developing the web app using VWD on my server. I now want to use VWD on my local machine and point to the project on my server. I am able to open the project. In order to access the database in the "Database Explorer" I use as my "Data Source", "MS SQL Server (SQL Client) and it attaches fine and I can see my tables and data.

Now for my problem:

When I try to run the application "VIew in Browser", which login.aspx page is my first page, I get the page, but it doesn't inherit my master page which has the basic navigation and layout. Then after I try to login I get this message.

The file "W:\BBApp\App_Data\TimeTracker.mdf" is on a network path that is not supported for database files.
An attempt to attach an auto-named database for file W:\BBApp\App_Data\TimeTracker.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Here is a portion of my web.config file for the connection string.

<connectionStrings>

<removename="LocalSqlServer" />

<addname="LocalSqlServer"connectionString="Data Source=.\SQLExpress;Integrated Security=true;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true" />

My website I started with the source code for the TimeTracker start kit and have added more pages and changed the sitemap.

In general I guess I need to know how to handle using VWD on my local machine, but accessing the project on the server. The reason I'm doing this is because my colleague needs to be able to access the web app too to add pages to the site.

Thank you for any help.

Take a read of this articlehttp://www.aspspider.net/resources/Resource170.aspx
should see you right. Also if you are using membership remember you will need to take
care about the aspnetdb.mdf aswell.

Hope it help, if not let me know.

Saturday, February 25, 2012

connection strings

This is probably a very basic question and I apologise for asking. Can an app developed with VWD using SQLexpress be used with server2000? if so how do I modify the connection string.

hi,

a long as no particular keywords for SQL Server 2005 are used (say, the unsupported "MARS_Connection=yes;", and the like), the connection string is quite similar.. please have a look at http://www.connectionstrings.com/ for samples..

regards

|||Also have a look at the driver, if you install the application on a non SQL System, the SNAC will probably not exist. YOu will either have to ship it within your application, or use a MADC driver which is installed on the most systems.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Tuesday, February 14, 2012

Connection String

Can VWD generate it by itself? I have a MDF file and I need to get the connection string.

What do you mean by generate it by itself?

|||

Ok, forget generating itself, how do I make the connection string for a mdf?

|||

Hi,

Form your description, it seems that you want to generate your connection string which links to a mdf file, right?

As for the "automatic way", do you mean an easy way to build the connection string? If so, you can use the connection builder to help you on creating the connection string. There are many ways to open the connection builder. i.e. Drag a SqlDataSource onto the webform, and configure the datasource, and click on "New Connection", and then you can select the server name, attach the database file, after that, click Ok, a new connection string would be added into Web.Config.

Thanks.

Sunday, February 12, 2012

connection problems

Hi, I've installed VWD, SQL Express and IIS successfully using Windows autentication. Everything went smoothly and I had a functional connection to my new database. But suddenly without any obvious reason I could not connect. When I try to connect inside VWD I receive the error:

"An error has occurred while establishing a connection to the server. When connection to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error 26 - Error Locating Server/Instance Specified)."

When I try to connenct through SQL Server Management Studio Express I receive the error:

Cannot connect to I6000\SQLExpress. Additional info as described above.

I haven't done any changes as far I know, so what could be the issue here? I haven't any experience from working with SQL so I am very grateful for any help.

Open VS2005, go to Tools/Connect to Database and try from there to open the database. That should tell you what the problem is.

Cheers

Al

|||

Hi cosmos,

You would have to habilitate TCP/IP protocol for your SQL Server Express.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||Also make sure the SQL Browser service is running.

connection problems

Hi, I've installed VWD, SQL Express and IIS successfully using Windows autentication. Everything went smoothly and I did have a functional connection to my new database. But suddenly without any obvious reason I could not connect. When I try to connect inside VWD I receive the error:

"An error has occurred while establishing a connection to the server. When connection to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error 26 - Error Locating Server/Instance Specified)."

When I try to connenct through SQL Server Management Studio Express I receive the error:

Cannot connect to I6000\SQLExpress. Additional info are same as described above.

I haven't done any big changes as far I know, only adding a column to a table, so what could be the issue here? I haven't any experience from working with SQL so I am very grateful for any help.

Verify that the instance is actually running. Open SQL Configuration Manager and check out the Services node. You should see SQLEXPRESS listed as running. If it isn't, start it.

There error your getting indicates that the Instance either doesn't exist or isn't running.

Mike

|||

Thanks for your answer,

The SQL Server (SQLEXPRESS) is actually running, but there is also another instance, SQL Server Browser, which is not running. But I guess the problem is somewhere else?

|||Hi,

SQL Server Express uses a dynamic port, if you don′t want to specify it within the conenction string, you will have to use the SQL Browser which acts like a redirector between client requests and the actual grabbed ports of SQL Server Express.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

You should be do this form the

programs,Microsoft SQL Server 2005, Configurations tools, Sql Server Surface Area Configuration.

In this there′s an option Surface Area Configuration for services.

In the select component choose Remote Connections, and then click in Local and remote connections, after in using TCP/IP only.

And you problem it′s resolve.

|||

There is no need to enable remote connections (sorry Kaos) because you are connecting to your local instance of SQLExpress. Jens is correct, you need to either enable the Browser or specify a port # in your connection string.

Mike