ASPNET User With Network Resources Elsewhere On A Domain
Dec 6, 2004
I've been trying to workout how, without impersonation, I can allow an application running under the default ASPNET user to access a network resource (SQL Server/ADAM) not on the same physical machine.
It seems that because the ASPNET user is a local user not a domain user I can't setup windows authentication on the network resource. That seems to leave impersonation which MS et al say is unwise.
Have I mised something here?
Regards,
Steve.
View 1 Replies
ADVERTISEMENT
Feb 18, 2008
set up asp .net user account on sql server 2005Question:
I've read the instructions in this article: http://www.netomatix.com/Development/aspnetuserpermissions.aspxBut do not know how to do this:You can grant 'Network Service' or 'ASPNET' user accounts permissions to connect to database.Please provide example on how to do this, thanks!
View 2 Replies
View Related
Sep 28, 2007
Hi,
We have the followoing:
-A "master domain" AD, a "sub domain" AD, a trust relationship between the two (sub trust master)
-A sql server 2005 on a win server 2003 in "sub domain" AD
-A linked server to "sub domain" AD
-A linked server login using a "sub domain" admin acccount
-A view to this linked server
-A grant on masterDomain/Domain Users to the database
-A grant on subDomain/Domain Users to the database
-We want all connections done through "Windows Authentication" not "Database Authentication".
Queries on the view work fine using "sub domain" user accounts.
Queries on the view fail using "master domain" user accounts (including master domain admin accounts)
"Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "ADsDSOObject" for linked server "ADSI" reported an error. The provider indicates that the user did not have the permission to perform the operation."
All connections are done through "Windows Authentication" not "Database Authentication".
Can we establish cross domain connectivity with "Windows Authentication" ?
Below are details of the implementation:
SELECT TOP (100) PERCENT *
FROM OPENQUERY(ADSI,
'SELECT displayname, givenName, sn, cn (etc...)
FROM ''LDAP://OU=PEOPLE,DC=subDomain,DC=com''
WHERE objectCategory = ''Person'' AND objectClass = ''user'' ')
EXEC sp_addlinkedsrvlogin @rmtsrvname ='ADSI', @useself='false',
@rmtuser='subDomainAdminAccnt', @rmtpassword='sunDomainAdminAccntPassword';
In SQL Server Mngt Studio in Server Objects/Linked Servers/Providers/ ADSI properties security tab I have:
"connections will: <be made using this security context> Remote login:'subDomainAdminAccnt' With password: 'subDomainAdminAccntPassword'
Error:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "ADsDSOObject" for linked server "ADSI" reported an error. The provider indicates that the user did not have the permission to perform the operation.
Msg 7320, Level 16, State 2, Line 1
Cannot execute the query "SELECT displayname, givenName, sn, cn
FROM 'LDAP://OU=PEOPLE,DC=subDomain,DC=com'
WHERE
objectCategory = 'Person'
AND objectClass = 'user'
" against OLE DB provider "ADsDSOObject" for linked server "ADSI".
View 7 Replies
View Related
Apr 5, 2007
I have a root domain and child domain.
After using ADMT to migrate the domain user or group into the root domain, when I use enterprise manager to try and change the permissions allocated to that domain user/group, i get the 'Error 15401 NT user or Group not found'.
This is a correct error as the user is now in the root domain, however sql (in sysxlogins) still thinks its in the child domain.
Is there a simpler way, other than collecting the users permissions, deleting the user from SQL then adding back in with the correct domainusername format, then adding the permissions back?
I tried renaming the 'name' in sysxlogins (not recommended) and while that worked, whenever I tried to add the migrated user to another database, the login name was missing and would not resolve.
I believe it is something to do with the SID not matching.
Any ideas on how to fix this ?
View 1 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
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
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 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
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
Apr 1, 2008
Hi,
I'm trying to access an SQL server 2005 database over the network. I'm at a client location plugged into their network, but when I log into my laptop I'm not logging into their domain. I have to access their network by typing in the name and password they gave me.
I cannot seem to access the database from my computer. I try to create an ODBC data source in the administrative tools, but the drop down list of detected SQL servers does not show the server I am trying to connect to. The weird thing is, it does show many other SQL servers on their network... just not the one that I'm trying to connect to. And I know that the one I want to connect to is working correctly because if I remote desktop into one of their machines (which is logged onto their domain), I can see it fine in the drop down.
Does anybody know how I can get a connection to this database from my computer, even though I'm not on the domain?
Thanks!
View 5 Replies
View Related
Feb 15, 2006
Is there some kind of way to limit the resources (CPU, number of sessions)per user in MS SQL 2000 database.Some kind of resorce manager thing...
View 1 Replies
View Related
Nov 14, 2003
can anyone help me with this error message, i follow the instruction of someone in other forum, but i cant find where the SQL Server Enterprise manager is, i am using MSDE.
View 2 Replies
View Related
Jul 5, 2005
Hello,I am getting following error when I tried to connect to the database.
Login failed for user 'SHALINIASPNET'
I am new to this and don't know how to fix it. I am running SQL Server Desktop engine 2000. I could connect through Server Explorer window, but not through ADO.NETHere's my connection string:
sConnectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyStore;Data Source=SHALINI;Workstation ID=SHALINI"
I have IIS and SQL Server running on the same machine.Please please help me.Thanks in Advance
View 1 Replies
View Related
Sep 13, 2005
We have an ASP.net application that currently sits on a server that runs IIS and sql server. We are spliting IIS and SQL server into 2 seperate machines. I believe I have the connection string okay as I can see the entries in the security log on the sql server machine however it keeps saying aspnet user invalid user or invalid password. What gives with this. We put .net on the sql server however this just added the aspnet user to the machine. Do I need to create an aspnet user inside the sql server and give it control of the dbases as well? I am running this using the personal web server not IIS on a server. I have a project on my desktop and am using the "local" IIS or personal web server that comes with visual studio out of the box. What kills me is that when I put the project on a real IIS server that has sql server on the same machine I have no issues. However when I split the dbase and the IIS apart onto 2 servers I get this aspnet invalid user or invalid password. HELP
View 5 Replies
View Related
Feb 12, 2008
Hey All,
This is my first time using the forums here nor am I a SQL programmer. I'm trying to help a coworker figure out how to access files from a network share (using a UNC path) from a different domain. Right now we have three domains - Production, Development, and the Local. There is a one-way trust setup with the development and local domains, so using cross domain accounts is easy. Unfortunately, we cannot setup one right now with our production domain to any of the other two domains. Is there a way to pass production credentials from our local or development domain servers to a production server share? Am I even approaching this in the right way? Maybe there is a different method, any help would be GREATLY appreciated!
-Andrew
Network Administrator
View 1 Replies
View Related
Aug 11, 2006
Hi
I created my DB in SQL 2005 Express in VS IDE. I have my app in IIS. When I try to use the DB (e.g. try to login a user in the app) it gives me the following error:
Cannot open database "cvRepository" requested by the login. The login failed.Login failed for user 'MyPCASPNET'.
My guess was that I had to give permissions to ASPNET user so I did in SQL Server Management. Still not working! Checked my Connection string and I think it's fine...
connectionString="Data Source=.SQLEXPRESS;Database=cvRepository;Integrated Security=True;User Instance=True"
Still not working!
Can anyone explain me what's wrong and to solve this?!
View 5 Replies
View Related
Sep 7, 2006
Hi all, I am new to ASP .NET and now I have been messing two days with the connection thing. I use the Visual Studio 2003 provided drag and drop SqlDataAdapter and SqlConnection to connect to the SQL 2000 server, developer edition (configured with the Windows authentication mode), but whenever I tried I always got a "Login failed for user mymachine/ASPNET" error. Can anyone help me with this? I have also tried, as somebody did, adding one line "<identity imperonate="true"/> to the Web.config file, but had the same kind of error. Do I have do make some change to my SQL server? Thanks a lot! Charlize
View 2 Replies
View Related
Oct 9, 2006
hi,i'm using user ASPNET to connect db:i added the user AdministratorASPNET in sql logins and addes ASPNET users in each database,and then in the connection string i use trusted connection but in production scenario where each user can connect in remote to sql db can i continue to use ASPNET user with trusted connection or i should use samething else?
View 1 Replies
View Related
Jul 9, 2007
Respected Members,
I have a question, when our aspx page is trying to access the SQL Server 2000 database than before this do we have to creaete a user with the name of ASPNET in SQL Server 2000, or without creating this paticular user(its the default user of ASP.NET account) our aspx pages can also access the SQL Server 2000,I have already SQL Server 2000 running in "SQL Server Authentication Mode" so while creating the user do I have to create it in "Windows Authentication" or "SQL Server Authentication", can you provide some link where I could find complete steps for craeting the ASPNET user or if some one can tell all the steps in details here.
View 1 Replies
View Related
Jan 14, 2005
Hi!
I've just started to learn to use Visual Studio, and has come to database access.
I ran into this errormessage:
access denied for user <machine name>ASPNET
The book I'm using just only say that I have to grant the ASPNET user account permissions before the Web application will have access to a SQL database. ... Seems clear at first glance ... but I lack a "how to" ...!
---
I've tried to search the net for solutions ... several thousands of pages came up ... indicating that I'm far from the first who have this problem. ... So after I now have spend hours reading, without finding any useful ansver to the question. ...
So let me just tell the most popular answers. (So You don't repeat something I allready have read hundreds of times.):
This question has been asked before
Yes, true answer, but it doesn't help.
See the FAQ
If it was stated were in the FAQ to look it could have been useful.
Use something called "enterprise manager" (WIN XP pro, don't have this, though.)
I use WIN XP pro, so that answer dosn't help me either.
---
Hope some one can help.
View 4 Replies
View Related
May 28, 2005
Im getting ASP.Net 2.0 Beta 2 setup on my home machine to kick around
with. Im assuming this error means i have SqlServer Express
mis-configured for integrated security. if so, how do i go about
making sure that the ASPNET user has at least read access to the
Database?
Error Message wrote:
Server Error in '/Kinetic' Application.
Cannot open database "aspnetdb" requested by the login. The login failed.Login failed for user 'GAMESASPNET'.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "aspnetdb" requested by the login. The login failed.Login failed for user 'GAMESASPNET'.
Source Error:
Line 13: protected void Page_Load(object sender, EventArgs e)Line 14: {Line 15: Membership.CreateUser("jeff", [password], [email]);Line 16: }Line 17: }
Source File: c:InetpubKineticDefault.aspx.cs Line: 15
View 3 Replies
View Related
Jul 9, 2007
Respected Members,
I have a question, when our aspx page is trying to access the SQL Server 2000 database than before this do we have to creaete a user with the name of ASPNET in SQL Server 2000, or without creating this paticular user(its the default user of ASP.NET account) our aspx pages can also access the SQL Server 2000,I have already SQL Server 2000 running in "SQL Server Authentication Mode" so while creating the user do I have to create it in "Windows Authentication" or "SQL Server Authentication", can you provide some link where I could find complete steps for craeting the ASPNET user or if some one can tell all the steps in details here.
View 3 Replies
View Related
Sep 19, 2014
We have 2 node sql 2012 cluster and we have a scenario where domain,IPs,Hostanmes and SQL network name are changing.
1> Can SQL cluster role be brought online by changing the sql network name and its IP once windows team reconfigure the OS cluster or there will be any challenges.
2>should I uninstall sql cluster on both nodes then windows will destroy OS cluster and they then they need to change IP,hostname and domain and then fresh installation of sql cluster
View 1 Replies
View Related
Aug 31, 2006
I hope anyone can help me with this. I am having problems connecting to the aspnet database. It
all started when I noticed that I could not log in to my webapplication
anymore under debug mode, although I was able to log in when remotely
accessing the website. I got the error message that the machineaspnet
user did not have access to the database: "Login failed for user
'GM-FEDORSASPNET' "This was highly peculiar and rather annoying so I tried several things to straighten this out, but it only made things worse!I
read that this had to with permissions of the database in question, al
though I could not understand why permissions suddenly had changed. I
tried to change the rights by attaching it to Management Studio Express
and defining an aspnet login, but that failed because a login under
that name was not accepted. I tried to make a copy of aspnet.mdf, delete the original and rename the copy to aspnet.mdf. When that didn't work, I then deleted the aspnet.mdf, counting on it that it would be regenerated automatically, but alas. I located the aspnet_regsql.exe tool to regenerate the database, but got the following error message: System.Web.HttpException:
Unable to connect to SQL Server database. --->
System.Data.SqlClient.SqlException: 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: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)What can I do?
View 4 Replies
View Related
Jun 11, 2007
Hello Guys,
I had been trying to solve this error with no success :
One or more of the server network addresses lacks a fully qualified domain name (FQDN). Specify the FQDN for each server, and click Start Mirroring again.
The syntax for a fully-qualified TCP address is:
TCP://<computer_name>.<domain_segment>[.<domain_segment>]:<port>
I had installed three instances on my local machine to test Data base mirroring :
Principal : running SQL Developer Instance
Mirror : running SQL Developer Instance .
Witness : Running SQL Express.
Database mirroring already enabled using startup flag : -T1400
i even tried to configure it with out a witness but still have the same error .
I used the follwoing server name in the mirroring wizard(not localhost) :
Principal : TCP://Ali-laptop:5022
Mirrored : TCP://Ali-laptop:5023
Witness : TCP://Ali-laptop:5044
whats the problem guys?!
View 25 Replies
View Related
Sep 21, 2004
How do I add login user ASPNET to my SQL 2000 Desktop Engine Server?. I can not find the "Server Manager" in the Start - Programs. Is there any other way to get around adding ASPNET login to the SQL server so I can test my VB program. I got the error: Login failed for user 'com_nameASPNET'.
View 1 Replies
View Related
Apr 30, 2008
Hello,
I am trying to create an ASPNET Login for a SQL Server express Database (As Installed via Visual Studio) so my ASP Web Applications can invoke the Database. But SQLServer Managemnt Tool is not recognising any ASPNET user names I try.
I am trying to add via Microsoft SQL Server Management Studio Express, but get an error
" An Object (User or Built-in Security principal) with the following name cannot be found "mycomputerASPNET". "
Any obvious reason why ASPNET is not being recognised as a Login object object
Unfortunately I am on VISTA and IIS7 ( I have enabled, and checked that ASP Applications Run.)
- The process works OK on my other XP machine, ASP.NET via IIS 5.1, which seems more straightforward to set up.
Any help Appreciated, Since I am really stumped
Cheers
View 1 Replies
View Related
Jul 25, 2007
Hi,
I wanted to deploy my Sql 2005 reports to my local machine and want it to get viewed by all the users through Asp.Net application.
User can directly view the reports by clicking on the direct link to report but when they try to view it using application having Report Viewer, running on iis it gives acess denied 401 error and can't view the reports
If I make my application to run on default port then it works fine
If I give rights to <particularMachineNameASPNET> then that user can view the report but if there are 100 users then will i Add 100 such entries???
I think I am making mistake in this case.
Any response will be appriciated.
-Thanks,
Digs
View 6 Replies
View Related
Oct 22, 2007
We recently upgraded to SQL 2005 from SQL 2000. We have most of our issues ironed out however about every 1 minute there is a message in the Application Event log and the SQL log that states:
EVENT ID 18456 Login Failed for the users DOMAIN/ACCOUNT [CLIENT: <local machine>]
This is a state 16 message which I thought meant that the account does not have access to the default database. The account is actually the account that the SQL services run under.
Any ideas? We can't seem to figure this one out. We actually upgraded to 2005 from 2000 and had an error appear after every reboot that prevented the SQL Agent from running(This application has failed to start because GAPI32.dll was not found. Re-installing the application may fix this problem.) We did a full uninstall of SQL and reinstalled fresh and restored the databases from .bak files and that is when the EVENT ID 18546 started occuring every minute.
We don't have any SQL heavy hitters here so please be detailed with any possible solutions. That you very much for any help you can provide!
David
View 5 Replies
View Related
Sep 10, 2002
SQL2K SP2 on Win2K Server in single native-mode domain
I'm trying to change MSSQLServer and SQLServerAgent to run under a domain account instead of LocalSystem. SQL is not running on the DC. I get Error 22042:xp_SetSQLSecurity() returned error -2147023564, 'No mapping between account names and security ID's was done'.
The SQL machine is part of the domain. I'm logged in as a Domain Admin.
What is the problem?
View 2 Replies
View Related
Jul 27, 2006
I need to provide a UI to get the information to add a windows login to a SqlServer database. The CREATE LOGIN Sql statment requires the user name as "DomainNameUserName". I can get a list of users in XML using the following code:
public static XmlDocument GetAllADDomainUsers(string DomainPath)
{
string domain;
XmlDocument doc = new XmlDocument();
doc.LoadXml("<users/>");
XmlElement elem;
DirectoryEntry searchRoot;
ArrayList allUsers = new ArrayList();
if (DomainPath.Length == 0)
{
DirectoryEntry entryRoot = new DirectoryEntry("LDAP://RootDSE");
domain = entryRoot.Properties["defaultNamingContext"][0].ToString();
}
else
domain = DomainPath;
searchRoot = new DirectoryEntry("LDAP://" + domain);
DirectorySearcher search = new DirectorySearcher(searchRoot);
search.Filter = "(&(objectClass=user)(objectCategory=person))";
search.PropertiesToLoad.Add("samaccountname");
search.PropertiesToLoad.Add("distinguishedname");
search.Sort.PropertyName = "samaccountname";
search.Sort.Direction = SortDirection.Ascending;
SearchResult result;
SearchResultCollection resultCol = search.FindAll();
if (resultCol != null)
{
for(int counter=0; counter < resultCol.Count; counter++)
{
result = resultCol[counter];
if (result.Properties.Contains("samaccountname"))
{
elem = doc.CreateElement("user");
doc.DocumentElement.AppendChild(elem);
elem.SetAttribute("name", (String)result.Properties["samaccountname"][0]);
elem.SetAttribute("distinguishedName", (String)result.Properties["distinguishedname"][0]);
}
}
}
return doc;
}
This works for listing the names but how do I get the NetBIOS domain name for a selected user as required by SqlServer? I have tried using TranslateName from secur32.dll. That works on some machines but for some reason on other machines, it returns a blank. Is there another way?
Thanks for your help,
Rob
View 3 Replies
View Related