Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET IIS
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...
Posted 9-Aug-12 2:43am
AlluvialDeposit at 9-Aug-12 8:45am
what have you tried? Do you have any code?
ajithk444 at 10-Aug-12 0:27am

this is the code i have used in my web config for connection string. I m using sql2008 supports windows authentication me what to do for this configuration...
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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 Logging in you code and then you will identify your issue.
Hope this information helps you,
-Amit Gajjar.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 554
1 Gihan Liyanage 338
2 RyanDev 248
3 Sergey Alexandrovich Kryukov 243
4 ChauhanAjay 220
0 Sergey Alexandrovich Kryukov 9,011
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928

Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 9 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100