Iis – C#/asp.net application runs fine on localhost (intranet), but not on server (Internet)

asp.netiissql-server-2008-r2visual studio 2010windows-xp

I'm a total n00b when it comes to SQL Server admin stuff, so sorry if this is basic. I've designed a website in C#/asp.net with a SQL Server backend on my local machine. Runs perfectly when I open the site through VS2010 and run it. However, when I publish it to IIS and try to run the site, the ASPX works fine but it can't connect to the data. The dropdowns are empty, and anything that deals with data (including logins) doesn't connect to the tables.

I'm assuming this has something to do with permissions? Can anyone help me?

I'm using SQL Server 2008 R2 and Visual Studio 2010, both on a WinXP machine (yeah, I know WinXP isn't built for this, but I just want to test this out before I upload it to a server I have to pay for).

Best Answer

Did you check the web.config file to see to which database server is it connecting to. Check if the Database server name is 'localhost'. If it is so, change it to the correct server name. Also, check if the tables have data in them.

Thanks, San.