Saturday, February 25, 2012

Access SQL Server 2005 database using a published website

Hi all,

I am stuck with a problem using ASP.Net website. I created a website which accesses a database table in SQL Server 2005. The default.aspx is a form which inserts/updates/deletes data from the database. After creating the website I published it to IIS (Inetpub -> wwwroot). When I use Visual Studio 2005 and build the website and start with debugging. the form comes up and i can insert/update or delete the data from the table as I want. Now, as I have the website published I can access the form from another sharepoint website using the url as

/Employee_Data/Default.aspx">http://<mydesktop>/Employee_Data/Default.aspx

the form shows up but I am not able to access any of the database. I do not see any errors either. Once I click on the button the page just refreshes but nothing else happens. I have my web.config as :-

<?

xmlversion="1.0"?>

<

configuration>

<

appSettings/>

<

connectionStrings/>

<

system.web>

<

compilationdebug="true"/>

<

authenticationmode="Windows"/>

</

system.web>

</

configuration>

Am I missing something? Ieven have Anonymous access in the IIS inetpub properties. I can even the database as I am the administrator.... I appreciate your suggestions.

Thanks,

Kavya

Can you post your connection string as well as SQL commands? Can you connect to the SQL Server from the machine (on which you can access the published website) via Management Studio?

No comments:

Post a Comment