A serious bug??

A

ad

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?
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

It sounds more like a problm with the deployment.

What is the error messate you get?
 
T

Tasos Vogiatzoglou

I think it's a permission issue.
Check with what user you access the database.

Regards,
Tasos
 
A

ad

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.
 
A

ad

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?
 
T

Tasos Vogiatzoglou

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
 
A

ad

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:
 
T

Tasos Vogiatzoglou

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top