开发者

Stored Proc works in VS 2010 development Server and not in IIS

Dear All, I have a tremendous problem. I am developing an ASP.Net web site for a coursework in my university. I have completed the site and I used procs for each and every interaction with the DB (MS SQL Server 2008). Ha开发者_JS百科ving finished the site, I tried to deploy the Site in the IIS 7 web server of the university because I will need to create Web services and also create Silvelight projects … The thing is that the procs do not retrieve data after deployment in IIS. In VS2010 the project works perfectly. The conn string is ok. I can retrieve data (having deployed to IIS). if I use

comm.CommandType = System.Data.CommandType.Text; and provide the command string. But not if I use Stored procs. e.g.

SqlCommand comm = new SqlCommand("ai932.Proc_RetrieveDocs", conn); comm.CommandType = System.Data.CommandType.StoredProcedure; SqlDataAdapter adapter = new SqlDataAdapter(comm); adapter.Fill(dTable);

ALTER PROCEDURE [ai932].[Proc_RetrieveDocs] AS BEGIN

SET NOCOUNT ON;
select * from ai932.Doctor;

END

I cannot understand where is the problem? Please some help !!!


What user does the IIS App Pool service run as? Is it NETWORK SERVICE? Does NETWORK SERVICE have permission to run the stored procedure?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜