Who Is Connected : Aspnet Or Iusr_
Apr 18, 2007
Hi
I spent the whole week trying to find a solution with a problem of authorization/access on a new website (aspnet2 + slqserver 2005)
The site was running well in the test environnement but once deployed the production site behavior was quite erractic. some clients run ok, others not and that changes for the same client with each session.
it appeared that the problem came from the access to stored procedures. sometime, theirs accesses were authorized sometime denied.
finally, tests showed that the client's userid was either aspnet or iusr_
by putting the same permissions on these 2 accounts, the problem is solved and all the clients are running fine.
now the question : for which reason the client connect randomly to one or the other of these 2 id ? is this normal ?
best regards
View 1 Replies
ADVERTISEMENT
Jul 15, 2007
Helo all,
i dont know if that is the right way, but i was wanted to make kind of sql profiler on a webpage :) and cool features would be to usa ajax to fire it async in some time secvence.. ok, ok, here goes my code and expla... i have sql2005 (express edition,, cose i think its so cool and for a lot of projects can be used for), attached startup procedure, whit> sp_procoption 'kreni_instanco_moja', startup, true, and kreni_insta... is like:
----------------set ANSI_NULLS ONset QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[kreni_instanco_moja]ASBEGINexec kp.dbo.start_traceEND----------------
ok and my start_trace is:
----------------ALTER PROCEDURE [dbo].[start_trace]ASBEGINDECLARE @traceidnum INT,@on BIT,@file_path NVARCHAR(50),@maxsize bigint;SET @on = 1;SET @maxsize =5;SET @file_path = 'O:BU_DATABASE' + convert(varchar,getdate(), 102);EXEC sp_trace_create @traceid = @traceidnum OUTPUT, @options = 2, @tracefile = @file_path, @maxfilesize = @maxsize, @stoptime=null, @filecount =0;EXEC sp_trace_setevent 2, 12, 1, @on -- ili 12 ili 13EXEC sp_trace_setstatus 2, 1 -- 1 = START, 0 = STOPEND----------------
actual code that brings table and shows sql executed is:
----------------use kpdrop table traceselect textdata into trace fromfn_trace_gettable(N'O:BU_DATABASE' + convert(varchar,getdate(), 102) + '.trc',1)select textdata from tracego----------------
and it works fine,, but when its fired from my local admin connection, and try that whit IUSR*???? not going... ok, i think that IUSR have to have privilage to open that O:BU_DATABASE ... file, and to have priv to drop tabel and to fire that function..fn_trace_get ... ?? so, that is where i got stuck up... any help would be veryyyy apreciated... hey, we can put some kind of project if anybody is interested! :) to have admin page and to monitor sql code that is executed,,, and remotely
if i was not clear in some explaining, you can ask me and ill try better
thenx, kpendic
View 2 Replies
View Related
Jul 26, 2006
Dear all,
Basically I want to set chain up the rights so that the anonymous web user IUSR_ .. can execute the new .NET subs, functions etc in the assembly, just as the anonymous web user can execute Stored Procedures when granted. In this way, it should be possible to call the .NET assembly just as classic stored procedures from ASP/ASP.NET.
I have written a .NET function which I can successfully execute if I log on to the database as an administrator by sending this T-SQL query; it returns the result of a given string:
select dbo.CLRHTMLString('abc')
The scenario is now to try to grant access to this assembly for a different role (webuser), which the classic IUSR_MYSERVERNAME is a login of, so that I can call the .NET Assembly when I am authenticated as the anonymous web user (e.g. via ASP, etc.).
To test access, I created a login (webusertest) for a user (webusertest) in the same role (webuser) on the database. But when I use this login, which supposedly has the same rights as the IUSR_, execution right is denied:
EXECUTE permission denied on object 'CLRHTMLString', database 'adt_db', schema 'dbo'.
Note: The 'webuser' database role has Execute permission on the Assembly.
I have also tested this from my actual web page, with the following results:
(1) IUSR_MYSERVER member of db_owner role: Web page has right to call assembly.
(2) IUSR_MYSERVER not member of db_owner role: Web page does not have right to call assembly.
Further test results:
(3) Function can be called when making the user "webusertest" member of the "db_owner" role, which is too much rights to grant for the anonymous web user.
(4) When adding the user 'webusertest' to get 'Execute' permissions on the assembly, it does not get added. After clicking OK, there is no warning message, but when opening the Assembly Properties -> Permission dialog box the same time, the 'webusertest' user does not appear in the list.
Thankful for any advice on this matter.
View 4 Replies
View Related
Jan 25, 2005
Hi
When I am trying to connect to MS Sql Server 2000 through Asp.net using C# , I am getting the error : “ Login Failed for HTASPNET �. Although I have added permission for this account to access the database . I would be very grateful to you if you could kindly explain to me what is the problem. Thank You.
MessageConnection = new SqlConnection("server=HT; Integrated Security = SSPI; Database=Forums");
.
.
MessageConnection.Open();
.
.
View 1 Replies
View Related
May 19, 2008
Dim delconn As New SqlConnection _
("data source=15-46SQLEXPRESS;AttachDbFilename =C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataProjectDB.mdf; Integrated Security=True;")
this is my coding,
anyone can spot an error from there??
the database can't be located somehow....
help me ,for god sake
View 1 Replies
View Related
Jun 9, 2006
if not Page.IsPostBack then Dim strConn As String = "server=(local);database=NORTHWND" Dim sql as string = "Select EmployeeID, FirstName, LastName from Employees" Dim conn as New SQLConnection(strConn) Dim Cmd As New SqlCommand(sql, conn) Dim objDR As SqlDataReader conn.Open()'This is where it has an error and says-- 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. The NORTHWND database is set up in the web.config fileThanks! Jon
View 3 Replies
View Related
Oct 11, 1999
Beginning this morning, when I look in Current Activity in our SQL 6.5 Server, all trusted user connections to my server are showing up under "SA".
We are running mixed security. Most of the connections are through ODBC. We have applied SP5a to SQL.
As far as I know, nothing in SQL has changed. From what others are telling me, nothing in NT or the network has changed.
Something is up. What am I missing? Where can I look?
Please help.
View 2 Replies
View Related
Mar 23, 1999
When I try to connect to my SQL server I get the following error.
Microsoft SQL Enterprise Manager
A connection could not be established to MLM1-[SQL Server] Cant allocate space for object 'Syslogs' in database 'tempdb' because the 'logsegment' segment is full. If you ran space in syslogs dump the transaction log. Otherwise use ALTER DATABASE or sp_extendsegment to increase the size of the segment.
Ok, I am not up on SQL so I'm not sure how to dump my tempdb database. I have a coworker that has only done this sort of thing in the Enterprise Manager and we can't get there. So how do I do this and make sure that I don't blow away any data? Also if I do dump my tempdb will this cure my problems and how do I avoid having this happen again?
Any help would be greatly appreciated,
Jeb
View 1 Replies
View Related
Jul 20, 2005
Hello all,I have a scripts which needs the information about the database inwhich it is running.How can I find out this information.For example if I want to know the User who has satrted this report, Iuse the SYSTEM_USER procedure.Does an equal procedure exist to find out, on which database the useris connected to.RegradsFranz-Josef
View 1 Replies
View Related
Mar 24, 2008
I installed SQL Server 2005 and Visual Studio 2005 and have discovered that the ASPNET machine account was not added as a user when going into "Computer Management". I obviously need this to run ASP.net apps.
I tried going to the Administrators group to add user ASPNET, but the system can't find this user.
How can I install the ASPNET account?
makimix
View 3 Replies
View Related
Jun 10, 2004
I just moved my website to a shared host, and I face some trouble.
Since there is more than one DB on the SQL server they don't want to create a ASPNET user. Is there a way to make my SQLCommand use my user name instead of ASPNET ?
Otherwise, can anyone explain to me the result of the ASPNET user on other website who will use the same server as me security wise ?
View 2 Replies
View Related
Mar 1, 2006
I seem to remember that when using VS2003 to create a website which connected to a MSDE database, I needed to explicitly grant access to the database for ASPNET machine account using the following SQL commands from within a .sql script:
EXEC sp_grantlogin '<machine>ASPNET'EXEC sp_grantdbaccess '<machine>ASPNET'
With VS2005, it sppears that upon creating an .MDF database in the App_Data folder this is no longer necessary.
I'd be interested to know why this is so. Does VS2005 automatically do this when the database is created?
If anybody could shed some light on this I'd be interested.
Thanks,Wayne.
View 2 Replies
View Related
Jan 7, 2006
using vs2005 to build web pages of asp.net 2.0, The database is SQL Server 2000,.But I always fail to connect.
using the following configuration in web.config:
<appSettings> <add key="DSN_student" value="server=(local);uid=admin;pwd=123456;database=network_course"/> </appSettings>
I also failed to connect using the following configuration in web.config:
<add name="network_courseConnectionString1" connectionString="Data Source=(local);Initial Catalog=network_course;User ID=admin;Password=123456;" providerName="System.Data.SqlClient" />
I am a beginner from China and eager to get answers! Thank you!
View 2 Replies
View Related
Oct 14, 2004
I have just installed Windows 2000 Pro, Visual Studio 2003 Academic and , MSDE 2000. I get the little icon in the Service Tray(?) showing an empty circle partially overlaying a server symbol. It says Not Connected-VSDOTNET.
If I click it and get SQL Server Service Manager and put in Server name of VSDOTNET, The drop down listbox for SERVICES is empty (no SQL Server choice)
I enabled TCP/IP for this server thru SVRNETCN.DLL. I'm a newbie to pc development. Help!
View 1 Replies
View Related
Mar 22, 2007
Hi everyone,
I have one Inventory system which is in VB6 and SQL Server 2000.
In my database there is table of users and userrights.
These are my application users. They are nothing to do with Windows users and SQL Server users. I am connecting to database using 'sa' login.
Now I want to display all my online users. I tried with @@SPID to manage their but not getting the exact results.
Thanks in advance.
Riyaz
View 5 Replies
View Related
Aug 11, 2005
Hello all,Is there a way to figure out when was the last time someone connected toa database? SQL 2000 environment.Thanks,Raziq.*** Sent via Developersdex http://www.developersdex.com ***
View 5 Replies
View Related
Mar 19, 2008
We have a existing backup, re-index job that runs at night on anexisting database that is now accessed by web users 24/7.Problem is that one of the steps is to kill all users before backupstarts so it kills any transactions that are happening at that timequestion is... Can users be connected during a backup? Will removingthe kill users step slow the backup alot?any other suggestions would be appreciated.thanks
View 1 Replies
View Related
Mar 7, 2008
sorry about asking basic question, just slipped out of my mind,
how to get the list of currently connected users on one database and on whole server in sql server 2005
thanks,
View 9 Replies
View Related
Jul 25, 2006
Hi,
I've recently copied an SQL DB (detach, copy data files, reattach) from SQL-Express on one machine to SQL 2005 on a new host. However I cannot set the permissions correctly for the ASPNET account.
It's current permissions use <oldhost>ASPNET which persists even if I remove it and reload the DB. I need to allow the access for the new host machine's ASPNET account but it cannot be found :/
Any advice anyone can offer would be greatly appreciated!
Regards,
Doug
View 1 Replies
View Related
Aug 31, 2006
Dear allI had a problem connecting to my website (through lan) from other machines in the company here.I googled some and figured out that I have to change the security settings of aspnet in my sql server express 2005.I did as suggested and now its workingMy question is - what should be the real security settings for aspnet on my sql server ?Should I really add it to the sysadmin ? (what solved the problem....) Guy
View 3 Replies
View Related
Sep 1, 2006
I am going though the ASP.NET QuickStart tutorials. One of the lessons is to add a datagrid. I am able to do that with VWD and am able to connect to the database in VWD. However when I try to execute the application I get a "Login failure" message because the user pcName/ASPNET cannot login. How do I add the ASPNET user to the SQLExpress database? There don't seem to be any administration tools that were installed with SQL Server Express 2005. Thanks in advance for the help!
View 3 Replies
View Related
Apr 15, 2007
Hi guys
I am trying to add aspnet user to sqlexpress. I am able to select the asp.net however when I click on OK button,
it is asking me to enter a name for it. COuld you tell me what name I should enter? I tried computernameaspnet didn't help?
is there better way to do this?
thanks for your help
Cemal
View 1 Replies
View Related
Jan 25, 2008
Hi,
I have a test database and need to to include the aspnet.mdf into my database.
I have generated a script for the aspnet.mdf, but don't know how to run/include this into my own test database.
1. Is there any magical sql-command that do the job in a clean way for me?
2. How can I change the name of aspnet in that auto generated script, if needed at all?
I have: SQL server Express Edition 2005, Visual Web Developer Express Edition 2008
Thank's
/Pepe
View 1 Replies
View Related
Mar 15, 2008
I know this may sound like a silly question but, my project currently uses two databases, the aspnet membership db and our application db. What I'm wanting to know is if there is a way to combine them without lossing any current functionality from either one? Also what if any gotchas there might be?
View 5 Replies
View Related
May 7, 2008
Hello everyone! Following are the things that I have to do :1) Create a "Friendlist" of every user registered. ( one user can have many friends)2) Create "Communities" which can have various users registered to them. How do I go about doing this in ASP.net..?! Please help!
View 10 Replies
View Related
May 29, 2008
Should a static connection be used in application. Is it advisable to use a static connection, i mean everytime should i create a new instance of sqlonnection object and then dispose it after use or should i use a static connection plz advise
View 2 Replies
View Related
Dec 1, 2003
10:15:50 PM Monday, December 01, 2003: [Fail] Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.
hey guys can someone help me out on this or point me to another forum with the same problem and the answer this problem thank you
View 10 Replies
View Related
Jun 15, 2004
I have developed an asp.net application and have deployed it to the web server. The application accesses an SQL Server to allow users to make changes to data. My connection string is the following:
"data source=" & ServerName & ";initial catalog=" & DatabaseName & ";integrated security=SSPI;" & "persist security info=False;packet size=4096"
On the SQL Server side, I have a trigger that logs when changes are made and by whom. The suser_sname returns <Servername>ASPNET as the user making the change. Why is this? Should it not be the user id of the user? If the SQL Server thinks that the current user is ASPNET then how can it make changes when this is not a user defined for the database.
The web site is set up to allow for Integrated Windows Authentication only. SQL Server is on the same machine as the web server.
View 2 Replies
View Related
Feb 10, 2005
hello all,
I would like to grant the MACHINENAMEASPNET user all acccess to my MSSQL database (i.e tables and stored procedures. I can do this through enterprise manager but id rather do it programatically so i can add it to my database creation script. What is the syntax for this?
I thought it would be along the lines of:
Grant all on databasename to localhostASPNET.
But obviously its not! Please help!
thanks
Tom
View 1 Replies
View Related
Feb 18, 2005
Hello.
I am using MSDE in an ASP .NET application using forms authentication in order to the user can visit my website anonymously but have to authenticate in some pages.
Web server and MSDE server are in the same computer.
I would like to know how role I should set for the ASPNET sql server user. I am using Microsoft SQL Web Data Administrator and when I am creating the ASPNET user, then a page with some roles is shown.
Roles like public (default), db_owner, db_accessadmin, db_datareader, db_datawriter...
I had applied db_datareader and db_datawriter but now, when I use store procedures in my code, an error is made so I have applied db_owner role for the ASPNET user.
Is this correct or db_owner is a excessive privileged role for the ASPNET user?
Thank you and sorry for my English.
View 1 Replies
View Related
Mar 31, 2005
This is the error message "Login failed for user 'SUSHMAASPNET'. "
I am Building a Data Form that displays data from a single table- the Customers table in the Northwind sample Database.
I have Visual Studio.Net 1.0 and SQL Server 2000.
So I feel that I need to add an ASPNET account to my database.
Please could someone tell me if this could solve the problem, if so
please could you tell me how to Add an ASPNET account to my database?
Thank you
View 2 Replies
View Related
Jul 6, 2005
The objective is to configure on a dev machine. Selecting New Database User is the easy part as the ***ASPNET user can be selected from the drop down listbox. What follows and what to do next is a myriad of choices. What needs to be done next? Is there a step-by-step document somewhere that you can refer?
View 1 Replies
View Related
May 2, 2007
I'm working on a big project, and in about 3-4 months I'm looking to put out out as a web app for some local businesses. My question is, is there a way I can disable having to use a <machinename>aspnet, and just use a SQL user I create? Otherwise, I'm not sure how I'm going to give the <machinename>aspnet access to my database in case I add more tables and what not.
Not sure if this should go here or in the SQL thread. Thanks
View 4 Replies
View Related