Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Monday, March 19, 2012

"User does not have permission to perform this action." problem

hey people

having a nightmare getting asp.net 2.0 to work with sql server 2005 express, bit of a newbie with it. trying to display a table from my sql database and every time i run the aspx table im getting this error.

 User does not have permission to performthis action.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack tracefor more information about the error and where it originatedin the code.Exception Details: System.Data.SqlClient.SqlException: User does not have permission to performthis action.Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identifiedusing the exception stack trace below.Stack Trace:[SqlException (0x80131904): User does not have permission to performthis action.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 keep getting the user permission error, even though it says on the management console that i have access to the database
 
any ideas?
 
rob 
 

ok the error doesnt tell you that you cant login

the problem is you already login but you cant do action.

can you look your connection string and find out what account are you using.

then check that account's right in your SQL 2005 database,

maybe the right in that account is very small

|||

check if you user have not only rights to connect to database but also right to select from tables you use or execute rights to stored procedures so check database security and your user effective permissions on database objects

Thanks

|||

(having a nightmare getting asp.net 2.0 to work with sql server 2005 express, bit of a newbie with it. trying to display a table from my sql database and every time i run the aspx table im getting this error.)

If you don't have Management Studio you can download it in the first link below and the second link covers how to add object permissions for the Asp.net account post again if you still have question. Hope this helps.

http://msdn.microsoft.com/vstudio/express/sql/download/

http://forums.asp.net/thread/1492092.aspx

Thursday, March 8, 2012

"SA" Insuffient Permission

Hi!
I just set up an alert to know when someone try to use the SA account.
This morning I received the alert in my inbox. Is working fine.
Do you know if there is any way that I can Know WHO is the user or computer
trying to use the SA account?
You help will be really aprecitated.
Kind Regards.
Hernan VilarHi,
Alert can fire a task which will search the sysprocesses table and
insert into a audit table (Normal table) with the below info,
HOSTNAME,
NTusername,
GETDATE()
Thanks
Hari
MCDBA
"Hernan Vilar" <hvilar@.corin.co.uk> wrote in message
news:0FE5FF70-C4F2-457B-8A68-F916DF6E3550@.microsoft.com...
quote:

> Hi!
> I just set up an alert to know when someone try to use the SA account.
> This morning I received the alert in my inbox. Is working fine.
> Do you know if there is any way that I can Know WHO is the user or

computer trying to use the SA account?
quote:

> You help will be really aprecitated.
> Kind Regards.
> Hernan Vilar
|||If the connection using SA is actually made this method will work. If the
connection fails then the method will not work bedause there is no entry in
sysprocesses. If the connection fails, I am not aware of a method to
determine who attempted the connection.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I would be carefull of this , I have 2 different servers that get hit
10-20,000 a night, it could get messy.
I would consolidate the logins or you may get a few emails 8-)..
Don
"Hernan Vilar" <hvilar@.corin.co.uk> wrote in message
news:0FE5FF70-C4F2-457B-8A68-F916DF6E3550@.microsoft.com...
quote:

> Hi!
> I just set up an alert to know when someone try to use the SA account.
> This morning I received the alert in my inbox. Is working fine.
> Do you know if there is any way that I can Know WHO is the user or

computer trying to use the SA account?
quote:

> You help will be really aprecitated.
> Kind Regards.
> Hernan Vilar

Friday, January 27, 2012

please help System.Data.SqlClient.SqlClientPermission problem

im getting this error when i try to access the application from the network. but in my computer work fine

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

please help... thanxs

When the asp.net application is deployed onto the webserver the asp.net worker process may be using the context of an account that does not have permissions to the database.

Please check the directory security tab for your website/virtual directory in IIS.

|||

the security tab if the iis is the for anonimous access...

|||

royrfc:

the security tab if the iis is the for anonimous access...

You need to make sure the account specified for anonymous access has permissions to access your database

|||

already add IUSR_ and ASPNET user to the database and nothing.

the application is an windows control library created by me in vs2005 , added to the aspx page

|||

royrfc:

the application is an windows control library created by me in vs2005 , added to the aspx page

So it is the .NET applet trying to access the database. You may need to give it the permissions by using CAS or declaratively I think.

I am not that knowledgable in this area so have a read of these articles, they may help

http://support.microsoft.com/kb/315529

http://msdn2.microsoft.com/en-us/library/Aa302424.aspx

|||

need help with that...

try some forums explaining CAS, but no luck at all

need help