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!
I'm a relative newbie to ASP.NET development (web development in general) so please forgive the ignorance. ;-) Ok, I'm using VWD to design and test my application and I'm using the standard membership provider system. I've read in various places not to muck around with the aspnet_* tables as it can cause havoc hehe. Therefore, I've created my own Member table to accommodate more fields that the aspnet_Users table does not have (since I don't want to mess around with that table) such as address, city, town, zip, birth date, etc. Obviously, I have a field in Member that corresponds to the userId primary key in aspnet_Users. Now, there are times when I need to display the username of a person's profile on a page. SELECT aspnet_Users.UserName<br>FROM aspnet_Users, Member<br>WHERE querystringid=Member.memberId AND Member.userId = aspnet_Users.UserId Now, this seems fine and dandy when there are few entries in the aspnet_Users table, but what if I tried that query when aspnet_Users grew to a hypothetical one million entries?? Does anyone know if those fields in aspnet_Users are properly indexed? I can't seem to determine one way or another with VWD's database explorer. I don't want to run the risk of a full table scan. But if those fields aren't indexed, I don't know if I should modify that table in any way. What to do? TIA
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.
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?
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 ?
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.
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
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
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!
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
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 ?
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
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?
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
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:
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.
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 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?
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
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?
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
Hi,I am executing a call to "sp_helptext" from a web service, in order toobtain the text of a stored procedure. The call itself seems to be ok buteventually it throws an exception saying that the specified object does notexist in the database - which is a false statement, i've checked carefully.I probably do not have enough rights to access something from the ASPNETaccount.Do i have to login as "sa"? Is this the only solution available?Bogdan.
hi, I am very new to asp.net..I am creating a webform which connects to sqlserver and display table contents to a grid control.When i run this form,i get error message as follows Login failed for user 'SERVERNAME/ASPNET'. I have read in one page of this forum that we should create aspnet user in sqlserver..i tried to create user,i can see 2 user Guest and public...I don't know what to do ? If someone replies my question,i would appreciate..I have struggling with this for the past 1 week..i couldn't find a solution. My code is as follows: Dim MyConnection As SqlClient.SqlConnection Dim MyCommand As SqlClient.SqlDataAdapter Response.Write("hello world") MyConnection = New SqlClient.SqlConnection("server=Localhost;Integrated Security=SSPI;uid=sa;password=;database=sample") MyCommand = New SqlClient.SqlDataAdapter("select * from emp", MyConnection) Dim ds = New DataSet MyCommand.Fill(ds, "emp") Response.Write("data set has been created") DataGrid1.DataSource = ds.Tables("emp").DefaultView DataGrid1.DataBind() thanks kar
VS2005Hi If I run the below code (this simply connects to SQL Server and returns the user name the connection is made under): Dim Connection As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString)
Dim AttCommand As New SqlCommand("SELECT System_USER", Connection)
Connection.Open() Dim AttendanceReader As SqlDataReader = AttCommand.ExecuteReader
AttendanceReader.Read()
Debug.Print(AttendanceReader.Item(0).ToString)I get: MyDomainpootle.flump Which is the account I am running on the dev machine. I expected ASP.Net to run as ASPNET irrespective of the currently logged in account. Am I plain wrong? Do I need to change something in IIS? Do I need to change something in ASP.Net? Any help greatly appreciated Thanks
Hi guys,I've got two apps that are going to have pretty much the same users and i wanted them to have the same ASPNET.MDF user database. Is it possible to store the ASPNET.MDF in a different location and then have the two apps access it from there or alternatively have it in the App_Data folder of one of the apps and then have the second app access it from there?Thanx
can anyone give me step by step instructions as to how I would go about correctly granting the aspnet account access to my sql server 2005 database ?? As far as I can see Ive set it up, but im getting execute permissions errors on stored procedures even though Ive gone into properties and permissions and added the aspnet account with execute permissions.
I have my normal SQL 2005 database....and another database (on the same machine) that is the default aspnet database. I use that for authentication of course. Everything is working well except now I need to (for a SP I'm creating) access the UserID field in the Users table (without the customer logged in). I know this isn't the best way to do it but....Can someone tell me how to programatically (from an existing SP) access the aspnet database? So I can just check something against the UserID (providerkey) I already have? The customer isn't logged in at this point. I have their UserID from somewhere else. Here is what I am trying to use now. IT Works in Query Manager but throws an error (...in this security context) when I run it in ASP.NET...SELECT @UserName=(select UserName from [aspnetdb].dbo.aspnet_Users where UserID=@UserID) Thanks.
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.
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
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
When I try to access my PasswordRecovery.aspx page I get an error. I've also added the Event Warning and the Failure Audit. I've tried deleting the ASPNET user account and recreating it using aspnet_regiis.exe. I still get the same error message. Should I add the ASPNET account to the Administrators group? Currently it is with the Users group. Login failed for user 'PC325862970629ASPNET'.
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: Login failed for user 'PC325862970629ASPNET'.
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 identified using the exception stack trace below. Stack Trace:
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?!