|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
A serious bug??am use VS2005 to develop Web application.
I put some DataTableAdapters in a ClassLibrary. When the Web Application need to deal with data, it call the methods in the ClassLibrary. It run ok in the VS2005 IDE. But when I deployment my Wep applicaotn to Web server, my WebApplicaiton fail to update using the mentod in the classlibrary, but it is ok to get data. Is it a bug? or how can I do? It sounds more like a problm with the deployment.
What is the error messate you get? ad wrote: Show quoteHide quote > am use VS2005 to develop Web application. > I put some DataTableAdapters in a ClassLibrary. When the Web Application > need to deal with data, it call the methods in the ClassLibrary. > It run ok in the VS2005 IDE. But when I deployment my Wep applicaotn to Web > server, my WebApplicaiton fail to update using the mentod in the > classlibrary, but it is ok to get data. > > Is it a bug? or how can I do? > > There are no failure messages, only didn't udpate any record.
If I include the TableAdapter in the Web application, it update ok. When the TableAdapter in in anothre ClassLibrary, it update no records. "Göran Andersson" <gu***@guffa.com> ???????:OkUcmyveGHA.4***@TK2MSFTNGP02.phx.gbl...Show quoteHide quote > It sounds more like a problm with the deployment. > > What is the error messate you get? > > ad wrote: >> am use VS2005 to develop Web application. >> I put some DataTableAdapters in a ClassLibrary. When the Web Application >> need to deal with data, it call the methods in the ClassLibrary. >> It run ok in the VS2005 IDE. But when I deployment my Wep applicaotn to >> Web >> server, my WebApplicaiton fail to update using the mentod in the >> classlibrary, but it is ok to get data. >> >> Is it a bug? or how can I do? I think it's a permission issue.
Check with what user you access the database. Regards, Tasos The ClassLibrary has it's own connection string in app.config.
For example, the connection name of the classlibrary is myDB. I have inclue the myDB in the web.config of the WebApplication. After deployment, the ClassLibrary uss the myDB in the web.config. Is it this the problem? "Tasos Vogiatzoglou" <tvog***@gmail.com> ???????:1148024456.570665.299***@g10g2000cwb.googlegroups.com...Show quoteHide quote >I think it's a permission issue. > Check with what user you access the database. > > Regards, > Tasos > Check the user you are connecting to the database.
Also check if you have impersonation enabled and check if the impersonated user has right access to the database. ( If the connection string has something like "Integrated Authenticaion=true" or SSPI Authentication="True", then most probably you are trying to write to the database using either the impersonated account or ASPNET). Check the user permissions in the database The connection string in the web.config is like:
<connectionStrings> <add name="myDataBase" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Health;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="Health" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Health;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> The first one connection : myDataBase is used for web project. and the second : Health is used for ClassLibrary. Is there something I mak mistake: "Tasos Vogiatzoglou" <tvog***@gmail.com> ???????:1148042512.987615.226***@u72g2000cwu.googlegroups.com...Show quoteHide quote > Check the user you are connecting to the database. > > Also check if you have impersonation enabled and check if the > impersonated user has right access to the database. ( If the connection > string has something like "Integrated Authenticaion=true" or SSPI > Authentication="True", then most probably you are trying to write to > the database using either the impersonated account or ASPNET). > > Check the user permissions in the database > You are connecting to your database with integrated authentication.
That means that if you have impersonation enabled (sth like <identity impersonate="true" in your web.config) you connect to the database with the user you are accessing the webapplication. For example if the user in you pc is AD a user AD with read/write permissions must exist in the database. If there is no impersonation, then you are connecting to the database with ASPNET user. In both situations the most probable cause is that you have permissions issues with the users connecting to your database. You should recheck with your db management tool the permissions. Regards, Tasos
Other interesting topics
Building other sln (to build references)
User control accessing outside control Textbox in User Control error -does not exist in current context Postback,Master page,User control problem Datasource doesn't generate data Reading files in a pages directory SqlDataSource GridView: Calculated Field Password Validation Hot to handle "Directory not found" from ASP.NET? |
|||||||||||||||||||||||