user85511
user85511

Reputation: 533

instance failure error in asp.net web site

I have a website included login module.when i hosted the website in iis there is an error

Server Error in "/" Application.
system.invalid operation Exception: Instance Failure

My ConnectionString is like this

<add name="MyConnectionstring" Connectionstring="Data Source=IP Address,1433;Network Library=DBMSSOCN;initial catalog=Databasename;integrated security=True" Provider Name="System.data.sqlclient"/>

How can i solve this problem?Any one knows Please help me

Upvotes: 0

Views: 2266

Answers (2)

Dikshit dhawan
Dikshit dhawan

Reputation: 11

Simply change DataSource=My-PC\\\SqlServer2008 to DataSource=My-PC\SqlServer2008 in your Web config because the previous one is valid one you are writing in Code Beind file but not in Web config file as it is an XML file.

Upvotes: 1

Jeff S
Jeff S

Reputation: 7484

The first thing I noticed is that you need to replace IP Address in your connection string with the actual IP address and Databasename with the actual database name. You also don't need ",1433" after the IP Address since 1433 is the standard port.

Second, is the SQL you are connecting to the default instance on the machine? If it is a named instance, you need to make sure to include the name in the data source setting.

Third, does the ID the ASP.NET process is running under have authority to connect to the SQL Server instance?

Upvotes: 0

Related Questions