0

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

1
  • debug the error, source of error may be different. Commented Dec 10, 2009 at 5:57

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.