Web Application And Role Management In Sql Server 2005
Hi every body
I'm developing a web application and i like to use the sql server 2005 role management features istead of developing a role management package in my program, I can do it on my tables and othe database items but I have no idea about using database access rights in my web pages to permit some one viewing or updating a web form... Is there any system table or system stored procedure showing access rights in my data base? or is there another idea to do this??
by Thanks
Javaneh
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SQL Server 2005 Application Role's Problem
Hi all. I have developed a VB6 program which will activate an Application Role to UPDATE and INSERT some tables in SQL Server 2005. My program will login with a username, say USER and then run with the rights of the Application Role which will SELECT, UPDATE and INSERT the following tables: 1) Table A 2) Table B 3) Table C The USER login is a restricted user which has only SELECT permission to Table A, B and C. I encounter a problem in which my program can only UPDATE table B and table C but Table A. I have double checked the settings of Table A, Table B and Table C. Theirs are all same. Fyi, the column which can't be updated is of type "datetime". Once i grant USER login UPDATE permission to Table A, my program works perfectly in which it can UPDATE all the tables including Table A. I have tried for almost 2 days but am still clueless. Any ideas? Thank you so much.
View Replies !
SQL Server 2000 And 2005 - Application Role - Sp_setapprole
Hi All, Is there any limitation for setting password to an approle (like it should be 8 character long, should not start with numbers) ? If so, what are those limitations ? Does the same is applicable for sp_setapprole which uses the same password ? please confirm, for both SQL Server 2000 and 2005 versions. thanks in advance, Regards, Kailai
View Replies !
Uploading SQL Express To SQL Server 2005 - Role's Causes Application Error With SSE Provider
I am very frustrated. Everything works on the local host but when I upload to server I can login to the admin role I created, but when I try to access pages that have role priveleges I get the following error: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file. The ASPNETDB.MDF database was uploaded using the Database Publishing Wizard. Please help!
View Replies !
Application Role And SQL Express (2005)
Hello, Can I confirm whether pooling=false in the connection string is still required for SQL Server 2005 (Express Edition)? Various google searches say pooling has to be turned off for SQL Server 2000, but I was just wondering whether it is still a limitation for SQL Server 2005 Thanks John
View Replies !
Sending SQL 2005 Dbmail When Using Application Role
I am attempting to use dbmail from an application that logs in to my database using an application role. Since the application role does not exist outside the database, I created an spSendEmail in the database with "execute as login='mailagent'" in it: I set the database to trustworthy, created a 'mailagent' account and added it to the msdb database with the databasemailuser role rights. Email works just fine on the server when I use the execute as login='mailagent' to fire off the msdb..sp_send_dbmail. But from the .NET application, I get the error: "Cannot execute as the server principal because the principal 'mailagent' does not exist, this type of principal cannot be impersonated, or you do not have permission." When I run my spSendEmail stored procedure from the calling database, I get the same error.
View Replies !
Application Role, App Role
Hi all, I am trying to connect to the database using application role. But gives an error An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) for the given connection string Dim connstring As String = "Data Source=Northwind;Initial Catalog=OrderProcessing;Persist Security Info=True;UserID=application_login;Password=wewewe;" Dim cmd As SqlCommand Dim param As SqlParameter Dim cookie As Byte() Dim cn As New SqlConnection(connstring) If (cn.State = ConnectionState.Closed) Then cn.Open() End If Please help.. Thanking you, Nirmala
View Replies !
Application Role
I am confused . What is considered an application and how SQL would know ? If I have a web site accessing SQL VIA IIS will SQL Server treat it as an application ? How about MS Excel ? Also , If I was to use the application of Power builder , using app role , how do control which user can use the app ? Thanks
View Replies !
Application Role
With reference to Mr. Eric Charron's article about Implementing Application Roles in SQL7, I have used this tips in my application. But I am facing the following problems. I am looking for some solution from this User's Group. Problem: I am using application (VB6/SQL7) role. I have number of reports. To display reports I follow the following steps. 1) Open Connection 2) Set application role 3) Execute procedure for the report 4) Close the connection Since I have no. of reports, I go through the aboue steps no. of times. For first 2 times it works fine but 3rd time, it gives error ie. application role not set properly. RM Joseph
View Replies !
Application Role
hi all ! first time i created application role with read and write permissions , once application accessing automatically it assigns rd and wr permissions to that users or previously wht permissions are there in logins will it be reflected to that application role. once we create the appliation role , is there any changes we have to do in coding part pls clear my doubt. regards manoj
View Replies !
Troubleshooting A New Application Role
Hi all, This one is a real X FIle, just without Mulder, Scully or the Lone Gunmen! I have a database, to which access must be restricted via a sole application. So, I have to use an application role. I go in the database and run these statements to add and activate the roles, respectively; Exec sp_addapprole 'Sirius', 'password' (The system confirms the role is created.) Exec sp_setapprole 'Sirius', 'password' 'odbc' (The system confirms the role is activated.) Right, now I should not be able to connect using anything but this role, agreed? But here's where things go wrong. I can then successfully connect from another computer by using MS query from Excel, from a login that is not even a member of the Public Role! I tried again, started and stopped the Server/DTS/Agent services and dropped the old role after each successful login before recreating it. I've checked my syntax exhaustively. I must be doing something wrong, or overlooking something, otherwise MS has a major security problem! (Just hope the Cancer Man doesn't find out!!) Thanks in advance everyone, Jaishel.
View Replies !
Security For Application Role
We have an application use Approle to read from database. If the client login to windows as administrator or a name that has the administrator rights, the application can get all data. If the client login to windows as a domain user that has limited rights, the application can't get all data. I run profiler and found that it seems, when application use approle to access a database, the login name is the domain user that log into windows. Is there anybody know what type of right the window login name should have in order to get all data from a database? Second question, when I log in to window as domainusername( username is not administrator, but has administrator rights). In the profiler, I can see the application use this domainusername access database. However, under sql server login node, I didn't find domainusername. Is this because, the domainusername belongs to buildinadministrator? Thanks
View Replies !
Application Role And SSRS
Hi dear reader I made an application that uses a Sql Server 2005 Express DataBase. In the database I made a application role. When the user logs into my application I run this procedure: If Not sqlConnectionCR Is Nothing Then If Not sqlConnectionCR.State = ConnectionState.Open Then sqlConnectionCR.Open() SqlConnection.ClearAllPools() ConsultasSqlCommand = New SqlCommand ConsultasSqlCommand.CommandType = CommandType.Text ConsultasSqlCommand.CommandText = "sp_setapprole 'appRole', 'drowssap" ConsultasSqlCommand.Connection = sqlConnectionCR ConsultasSqlCommand.ExecuteNonQuery() End If Else.... I understand that this procedure connects to my sqlserver database as my application role Ok, so far no problems in reading and manipulating data. The problem comes with the reports in my application. For example: I have a reportviewer with a serverreport but when I try to show the report gives an error about permissions and grant access.... I think that is because the Server Report uses the user account (domain/user) to read the database. No user (besides admin) has access permissions in the database (only admin and application role). So, my cuestion is: How can I tell Report Server to use the application role to display reports? Thank you for your time and help. Giber
View Replies !
BULK INSERT And APPLICATION ROLE
I want to add bulkadmin permission to my applicatio role. Is it aposible.My windows account havo only public permission on database.I'm using application roleEXEC sp_approlepassword 'MyRole', 'password';Therefore I want to BULK some data with BULK INSERT command.Error is:The current user is not the database or object owner of table'tablename'. Cannot perform SET operation.Thanks in advance.
View Replies !
Use SQL 7.0 Application Role With Crystal 8.0 Crpe32.dll
using vb6 and crystal global32.bas to make function calls to the crpe32.dll and there doesn't seem to be any calls to pass the application role id with password. ap roles must be passed at the ad hoc level, which means i have to execute the system stored procedure for the ap role thru crystals connection to the sql server. HELP....seagate has tried to help, but want me to use odbc dsn, which is exactly what i'm trying to avoid. oledb provider works like a champ, except for app roles with crystal.
View Replies !
Connecting To A Database From VB Using An Application Role
I know how to create an Application role in SQL server 7. Now how do I connect to the database from VB using that Application Role? I can't find anything about this topic anywhere. Is this the purpose of an Application role or am I way off? Thanks for the help Steven Abt StevenA@grsgroup.com
View Replies !
Create Database With Application Role...
Hi, I want my application to create database and I do the following things: 1)Create application role 2)Grant create database to application role 3)Activate application role 4)Create database and I get the answer: CREATE DATABASE permission denied in database 'master'.
View Replies !
Application Role Losing Connection?
Hi, I'm testing the use of application roles for security. The customer I work for has still a lot of ASP intranet applications running. We're migrating the databases to a SQL Server 2005 server. I've changed the connection string to a user without any permissions but to log on. After that I use an application role for permission to select different tables and to execute Stored Procedures. The first queries do execute but after that I get "Permission denied", like I haven't got the application role anymore. Any ideas? Adrian
View Replies !
Get Sql Err Message 15422 When Activating Application Role.
Running VB 2005 Express Edition and Sql Server 2005 Express Edition (SQLX). Developing a desktop application which calls a local instance of ".sqlexpress". This app needs to set data base options and add/del various table columns. When activating the application role, I get the following message: HariCari SQL Error/s 15422 - Application roles can only be activated at the ad hoc level. Anyone know what this message means? I have searched SQL Server Books On-Line and been unable to find a list of Sql err numbers. Either I have missed the obvious or Books On-Line has missed the obvious. Thanks Gary
View Replies !
Login Failed For 'user' (Application Role)
I've created a database in SQL Express and I have a Windows form attempting to connect to it through SQL Authentication. Connection string: private string connString = @"Data Source=.sqlexpress;Initial Catalog=SQLTestDatabase;User ID=SearchAppRole; Password=password;"; The role I have added to the database is an Application Role. It has been added to the Database permissions with Grant checked for "Select" and "Authenticate". If I test this with query analyzer, it returns expected results (if I remove Grant from 'Select', it fails) sp_setapprole 'SearchAppRole', 'password' select * from recipe If I edit my connection string (for testing purposes) to use the sa account, the application can connect and run the Select statement: private string connString = @"Data Source=.sqlexpress;Initial Catalog=SQLTestDatabase;User ID=sa; Password=sa_password;"; However, I cannot get the application to successfully logon and run the select statement when using the user id and password of the Application Role. I get error: System.Data.SqlClient.SqlException: Login failed for user 'SearchAppRole'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj I can't find much information on Application Role...I just want one basic permission for the application as a whole. Any help is appreciated. Thanks.
View Replies !
Application Role How Query A View Whose Reference Table Is In Another Db?
Hi everybody. I created an application role in a database (DB1) and gave it all the rights on a view in DB1 which refers to a table located in another db (DB2). I also gave the rights to the app role on a table of DB1 I tried to use this app. role through the sp_setapprole launched by a user (server principal?) which is SQL Server administrator (and local administrator (Win 2003 Server)). With the following query SELECT USER_NAME() I see that the approle is being used. Than, if I query the table on DB1 everything works, but if I query the view, referring a table in db2 I get following error: The server principal "NameOfServerPrincipal" is not able to access the database "DB2" under the current security context. What should I do to make it work? The table in DB2 has the same schema of the view in DB1 which refers to it. I put the DB1 TrustWorthy and both the database have the db_chaining option activated. Any idea on how to solve the problem would be widely appreciated. Thank you very much. Vania
View Replies !
SQL Server 2005 / Securityadmin Role / SSMS
Experiencing a little weirdness with SQL Server Management Studio...Have created a login, that has fixed server role "securityadmin".The login can create/drop logins, add/remove them as users indatabases, etc.The login can change another login's password, using SQLfrom a query window (e.g. alter login bob with password='abc')However, the login *cannot* change another login's password,using SSMS GUI (e.g. "Security", "Logins", double-click "Bob",change password, say "OK"). The error text is:Change password failed for Login 'Bob'. (Microsoft.SqlServer.Smo)Additional information:An exception occurred while executing a Transact-SQL statement orbatch.(Microsoft.SqlServer.ConnectionInfo)Cannot alter the login 'Bob', because it does not exist or you donot have permission.(Microsoft SQL Server, Error: 15151)Has anybody else experienced this?
View Replies !
Creating Databases Under MS SQL 2005 Server (SP-2): Dbo User Role
Good Day, I am having a problem with creating databases in MS SQL 2005 Server. When I attempt to assign an User Mapping for my SQL user account to the newly created database, the "dbo" user and schema is already assigned. When I try to drop this user in favor of my own, I receive an error message: Cannot alter the user "dbo" (Microsoft SQL Server, Error: 15150). I am connected to my database engine through the "sa" account. Regards, Keith
View Replies !
Can't Make Database Role A Member Of Another Database Role In 2005.
In sql server 2000, I created some custom database roles called ProjectLeader and Developer. I would make these roles a member in the fixed database roles so that I would only have to add the user to the ProjectLeader or Developer role once and they would presto-magico have the security I wanted them to have with no unecessary mouse clicking. I'm not sure how to repeat this process in 2005? Management Studio doesn't seem to allow you to add a role as a member in another role. Is there a work around or solution for this?
View Replies !
SQLCe Errors When Doing Developing A SQL Mobile Application With Visual Studio 2005 And SQL Server 2005 Tutorial
I'm attempting to use RDA to synchronize a pocket pc emulator with SQL Server 2005 database by following tutorial http://msdn2.microsoft.com/en-us/library/aa454892.aspx, which uses AdvWorksMobile database that comes with SQL Server 2005. When get to testing of "To test application features " ( step 4 of the merge replication setup lab ), I am receiving SQLCe Exception errors. ORIGINALLY, I was able to deploy an application and view the local database on the emulator, but once I clicked "InitSinc" button, I received an error. "Failure to connect to SQL Server with provided connection information. SQL Server does not" exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect. Found this error listed in Server Agent Errors log http://technet.microsoft.com/en-us/library/ms172357.aspx, but it wasn't very helpful since it doesn't provide any suggestions on fixing the problems. I am brand new to SQL CE Server , mobile programming and .NET framework in general so please bare with me All the connections / security settings, etc that were set up were taken from a tutorial so I am not sure what SQLCeServer is complaining about. Reading up on the error on the web didn't help, it all pointed to making sure that the snapshot folder had correct permissions set up. I verified that MACHINENAMEUISR_MACHINENAME guest user had Read rights to the database so I don't think that piece is the problem. Otherwise ,Merge publication has been setup in Microsoft SQL Server Management Studio by following the tutorial. I am trying to run this sync on my home pc so there should be no issues with any user permissions I have IIS installed I did NOT have SQL Server Agent running in management studio at this time I am trying to run this tutorial on an XP machine, which is my regular home PC so I dont think there are any special networking settings to consider I am able to hit http://localhost/AdvWorksMobile/sqlcesa30.dll from my pc OK, but when I try to hit it from a cradled emulator ( after replacing "localhost" with "MACHINE_NAME" ), Internet Explorer on the emulator gives me a "Cannot Connect With Current Settings" error message. This part wasn't part of tutorial but decided so not sure if I am supposed to be able to hit it from my emulator..so I am not sure if the fact that I can't hit it is related to the problem. AFTER STARTING SQL SERVER AGENTin Microsoft SQL Server Management Studio, I killed the application, and after relaunching it, it hits "The Specified table does not exist [Vendor]" error. This time it doesn't even launch first - that is I dont even get to pressing "InitSinc" button. Debugger is showing that this error is hit on the following line in AdvWorksMobile.AddWorksDataSetTableAdapters int returnValue = this.Adapter.Fill(dataTable); I am not sure why the errors changed on me after starting SQL Server Agent. What can I do to fix this connection problem? Thank you so much for your help! Irina
View Replies !
Ent Mgr. Management-CurrentActivity-Application - Error?
I'm having a problem with couple of users on our network not connecting to SQL exactly right. In the CurrentActivity window under the application column these users are not showing the authenticated usernames. Example: it should be username@computername but all that shows is @computername. These users get weird security problems that I have not been able to resolve. Our network admin is looking into it but he's not sure why these users should be any different than the rest. Any suggestions?
View Replies !
Security Error When Execute Sp From An Application, But Not From SQL Management Studio.
Hello, I am facing a very odd behavior with SQL server 2005. I have a database role with specific permissions to execute only some of the stored procedures in the database. I also have a SQL login/user attached to the role. If I execute one of the stored procedures from the application (web application, with Microsoft enterprise library database block) I am getting a security error stating that I need select permission for the schema. However, If I execute the same sp with the same parameters from SQL management studio, connecting with the same SQL login as in the application I can execute the sp without any security errors. The SQL management studio is in on a different server than the targeted database. Are there any differences between executing stored procedures from SQL MS and from application when using the same SQL login? Thanks, IT
View Replies !
User Token Is Different When SP Is Executed In Management Studio Vs Application
Hello, I have a stored procedure that outputs login token and user token information. The stored procedure has WITH EXECUTE AS CALLER specified. When I execute the stored procedure from Management Studio I get the following output from the stored procedure <login_token pid="267" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" /> <login_token pid="2" sid="Ag==" name="public" type="SERVER ROLE" /> <login_token pid="3" sid="Aw==" name="sysadmin" type="SERVER ROLE" /> <login_token pid="257" sid="AQIAAAAAAAUgAAAAIAIAAA==" name="BUILTINAdministrators" type="WINDOWS GROUP" /> ... (more groups) <user_token pid="7" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" /> <user_token pid="0" name="public" type="ROLE" /> <user_token pid="5" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2NrCAUAAA==" name="MYDOMAINPeople" type="WINDOWS GROUP" /> <user_token pid="16" name="approleDirector" type="ROLE" /> <user_token pid="16384" name="db_owner" type="ROLE" /> When I execute the stored procedure through my application (IIS application connecting to SQLServer 2005 through SQL Native Client - not .NET) I get the following <login_token pid="267" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" /> <login_token pid="2" sid="Ag==" name="public" type="SERVER ROLE" /> <login_token pid="3" sid="Aw==" name="sysadmin" type="SERVER ROLE" /> <login_token pid="257" sid="AQIAAAAAAAUgAAAAIAIAAA==" name="BUILTINAdministrators" type="WINDOWS GROUP" /> ... (more groups) <user_token pid="1" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr4QQAAA==" name="dbo" type="WINDOWS LOGIN" /> The login token is the same but the user token is dbo instead of the actual user. What am I doing wrong? Thanks.
View Replies !
Reporting Services Section Is Not Showing Under Application Management
Hi, I installed Reporting Services Add-in for Sharepoint 2007, on my Server where i have both Sharepoint 2007 and SQL Server 2005 and report Server are installed, i already installed SQL Server SP2, but in SharePoint 3.0 Central Administration under Application Management Reporting Services section is not Showing. Please let me know if anybody has the got the same issue and fix it. Thanks Ahsan
View Replies !
Different Results When Running Procedure From Management Studio Vs Application Code
I'm updating a process that recreates a large table every night. The table is the result of a bunch of nightly batch processes and holds a couple million records. In the past, each night at the end of the batch jobs the table would be dropped and re-created with the new data. This process was embodied in dynamic sql statements from an MFC C++ program, and my task is to move it to a SQL Server 2000 stored procedure that will be called from a .Net app. Here's the relevant code from my procedure: sql Code: Original - sql Code -- recreate new empty BatchTable table print 'Dropping old BatchTable table...' exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table -- validate drop If exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) Begin RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT End Else Begin print 'Old BatchTable dropped.' End print 'Creating new BatchTable...' SELECT TOP 0 *, cast('' as char(3)) as Client, cast('' as char(12)) as ClientDB INTO dbo.BatchTable FROM differentDB.dbo.BatchArchives --validate create If Not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) Begin RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT End Else Begin print 'New BatchTable Created.' End -- recreate new empty BatchTable table print 'Dropping old BatchTable table...' exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table -- validate drop IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) BEGIN RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT END ELSE BEGIN print 'Old BatchTable dropped.' END print 'Creating new BatchTable...' SELECT TOP 0 *, CAST('' AS CHAR(3)) AS Client, CAST('' AS CHAR(12)) AS ClientDB INTO dbo.BatchTable FROM differentDB.dbo.BatchArchives --validate create IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) BEGIN RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT END ELSE BEGIN print 'New BatchTable Created.' END The print statements are there because the .net app will read them in and then write them to a log file. Some of the other mechanics are there to mimic the old process. The idea is to duplicate the old process first and then work on other improvements. This works in Management studio. The .Net App reports that the old table was dropped, but when it tries to create the new table it complains that "There is already an object named 'BatchTable' in the database." I have verified that the old table is removed. Any ideas on how to fix this?
View Replies !
SQL Server 2000 Databases To SQL Server 2005? Enterprise Manager And Management Stuio At The Same Server?
When I proposed start to use SQL Server 2005 for new VS 2005 web sites, one of my co-workers responded that we will update the old SQL Server 2000 databases to SQL Server 2005 when we are ready to use 2005 SQL Server. Questions: 1. Any expected problems to upgrade old 2000 databases to new 2005 SQL Server? 2. I have installed both 2005/Management Studio Express and 2000/Enterprise Manager in my PC. Any expected problems when running both 2000 and 2005 SQL Server at the same database server? 3. What is the best configuration for running SQL Server 2005 when we have old 2000 databases? Upgade or not upgrade? TIA, Jeffrey
View Replies !
How To Call SQL Server 2005 From ASP.NET Application?
I am trying to call a view that is already in SQL Server 2005 from my ASP.NET 2.0 application. I get the following error message: The request for procedure 'vwMyView failed because 'vwMyView' is a view object. I thought I could call a view the same way that I call a stored procedure but I guess I was wrong. How can I fix this? Here is some sample code too: Dim Results As DataSetDim Cmd As IDbCommand Dim Adapter As IDbDataAdapter Results = New DataSet Cmd = DB.CreateCommandCmd.CommandText = "vwMyView" Cmd.CommandType = CommandType.StoredProcedure Adapter = DataSource.CreateDataAdapter Adapter.SelectCommand = Cmd DB.Open() Cmd.Connection = DB Adapter.Fill(Results) Cmd.Dispose() DB.Close() Return Results
View Replies !
Application Cannot Connect To SQL Server 2005.
I am having a strange problem. I have an application that to connects to SQL Database in SQL Server 2005. When I run the application with Visual Studio everything works fine but when I deploy the application on my web server and then to access the site . I get an error : Login failed for user ''. The user is not associated with a trusted SQL Server connection. For some reason the application is not passing the user name . I have checked the IIS and authentication is set to Integrated Windows Authentication . My connection string is correct as well <add name="xxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxx;Integrated Security=SSPI" providerName="System.Data.SqlClient"/> I will appreciate any kind of assistance in this matter. Thanks
View Replies !
Can't Connect To Sql Server 2005 From My Asp.net Application
Hi I can't connect to sql server 2005 from my asp.net web page. I seem to be able to connect to it when i run the application from within visual studio but i can't connect to it when i run the application from IIS.I am new to sql server 2005 express so please bear with me.The error message i get is: Cannot open database "Vets" requested by the login. The login failed.Login failed for user 'OSCAR2K4ASPNET'.I don't know where this user OSCAR2K4ASPNET came from but i looked in sql server 2005 and there he is. In the left hand pane I went to Security and then logins and found oscar2k4asp.net there. I went to the properties for this user and went to User Mappings. There was no tick next to my Vets database so I added one and ran the application from IIS. I also added the user to every single role in the vets database (including dbowner). I also went into the vets database itself and found the oscar/aspnet user and made sure he was added to every role. I ran the application again. This time i got a lots of different errors. If the page was trying to run a select procedure I got the error user does not have select permission. If the page was running an SP i got the error or user does not execute permission I have never had this problem before so I don't understand.Where did this user come from? Was he created automatically when i configured my database for membership and roles? How do i set up this user so he can access the databsae from IIS. The only way I could get the application to run from IIS was to go to Security - Logins for sql server and add the oscar2k4asp.net user to the sysadmin role. I find this very strange. Naturally i don't want to leave oscar2k4 in sysadmin. Please help :) I can't upload my website until i fix this Thanks, andrea
View Replies !
Problem In VB6 Application With SQL Server 2005
I have got a VB6 application where I update local SQL server table from MS Access table with code like that: ---------------------------------------------------------------------------------------------------------------- Dim rst As ADODB.Recordset Set rst = New ADODB.Recordset rst.Open "SELECT * FROM Table1 WHERE [Fld1]=" & v1, Cn, adOpenKeyset, adLockOptimistic 'check if exist if not exist create new If rst.EOF Then rst.AddNew rst("Fld1") = v1 rst("Fld2") = v2 rst.Update End If rst.Close ---------------------------------------------------------------------------------------------------------------- On rst.Update I have got an error message that the server has to be added to syservers as linked with stored procedure sp_addlinked srever. Why? Anyhow I executed the stored procedure then I've got error message 16933, "The cursor does not include the table being modified or the table is not updatable through the cursor." I had to rewrite the code to "INSERT INTO (Fld1, Fld2..." and it works. Is something wrong in SQL Server 2005 installation or any other reason? Please help.
View Replies !
ASP Application Becomes Slower In SQL Server 2005.
Hi all, My ASP application is running fast in SQL Server 2000. But when we shifted it to SQL Server 2005, it becomes very slow. I have created the indexes also. There is lot of data in the tables. Is there any option to build the indexes for previous data. Please help.... -Shah.
View Replies !
Application Insist Open SQL Server 2005 While The Host Still With SQL Server 2000
I don't know why my application on the internet try to access the SQL Server 2005, when the host still having the 2000 edition. I put the following connection string: Data Source=##DBSERVER##;Initial Catalog=##DBNAME##;User ID=##DBUSER##;Password=##DBPASSWORD##; Isn’t everything fine with that? I created the table by host but dosen’t work. I’m wondering if can I conect straight with Data Base, without register in the server, like with mdb? This is the error that I’m getting. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
View Replies !
|