I have jus now created a virtual directory and hosted my web application in iis 6. in my application i am using a login page,.the problem is it is not connecting to the database. what setting should i do to connect to the sql 2008 database.Help me friends...
解决方案Hi,
Here you need to do steps to identify problem.
1) check if you connection string is correct in Config file.
2) check if your database server available.
3) add logging in your application to identify exception.
Actually some exception occur from your application but you may have not creating logging so not getting exact error message.
Please Add Loggingin you code and then you will identify your issue.
Hope this information helps you,
Thanks
-Amit Gajjar.
Check application pool user. If you use integrated security, the user impersonated by the pool will try to connect to the database, thus needs to have all required rights. You also need to check if the database server and service can be contacted from the web server from network and firewall point of view. The exact exception message you get will help you in identifying the problem - and if you add it to your post, we also can help you in it.