Windows Authentication To SQL With AD Username And Password In Connection String?

Jul 29, 2010

I'm writing an ASP.Net MVC intranet application which is accessed via handhelds and a range of browsers. My users all have AD accounts and have different permission to our SQL database views/procs depending on who they area. The database also uses CURRENT_USER for horizontal partitioning.

Because of the range of devices that need to access the application I can't rely on impersonation/delegation or the trusted subsystem. I want the user to simply input username and password (same as AD) when the above mechanisms fail.

Does anyone know how I can use AD username and password in a connection string to access the database without creating a set of SQL mirror accounts? I can't login with network service or a sql proxy account because the database needs to be user aware.

View 1 Replies


Similar Messages:

Security :: Add A Connection String By Using A Window Authentication With The Username And Password?

Jan 3, 2011

In the web.config, how do add a connection string by using a window authentication with the username and password? I have tried like this and it keeps ignoring the username and password

<connectionStrings>
<clear/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Integrated Security=SSPI;Initial Catalog=ufiledb;Data Source=MyServer;User Id=user1;Password=xxxxxx" providerName="System.Data.SqlClient"/>
</connectionStrings>

View 2 Replies

Windows Authentication - Reenter Username And Password Everytime When Open A New IE Browser

Jun 18, 2010

I have an ASP.NET setup website using Windows authentication. Each time I open IE and try to access the webpage I get a windows authentication screen. Once I have logged in I can see the website fine. My problem is that every time I open a new IE browser I have to re-enter my username and password. I have heard about thew double hop issue, is this what it could be. If so how many ip fix this. Any ideas how i can stop this box showing up each time? I have ticked the "remember my username/password" tick box but still no joy. I am using Windows Server 2003, IIS 6.0 and .NET 4.0.

View 2 Replies

Databases :: Oracle - Connection String Without Username And Password?

May 10, 2010

I am connecting to Oracle database from .net using OLEDB.

My Connection string :

[Code]....

I am using above ConnectionString to communicate with database. To make it work, I have to store password (don't want to do that) in session and use it every time I need to talk to db.

1) Is there any other connection string without username and password with oledb?

2) I use "Integrated Security" for MSSQL. How can I use the same with OLEDB - Oracle database?

string sConnectionString = "Provider=OraOLEDB.Oracle;"

View 2 Replies

Security :: Getting Windows Username Using Windows Authentication?

Sep 3, 2010

I am developing one intranet website. Being an intranet application, one of the requirement is to have a single sign on feature.

It means that the windows PC username (i.e the "ctrl + alt + delete" username) is going to be the username for the system.

How do i fetch that username?

I tried the following two ways which are working in debug mode but not on live site.

System.Security.Principal.IPrincipal user = System.Web.HttpContext.Current.User;
Response.Write(user.Identity.Name);
&
Response.Write(Request.ServerVariables["AUTH_USER"].ToString());

Both the above method works when i run the page from visual studio.

However when i run the page from IIS or any other server, it gives me a blank value

View 12 Replies

Wcf - Store Username And Password Authentication?

Jan 12, 2011

I have a service (WCF) with which my ASP.NET page will communicate. The WCF service has hashed passwords in its data store (a file actually). The WCF service requires the username and the hashed password on every call. Nowm the problem I'm encountering is that if I authenticate the user with forms authentication in ASP.NET, a cookie will be saved in the user's computer after the user is authenticated but I would like to save the username and hashed password too so that the user may able to use the WCF service. Where should this information should be saved so that it is safe and secure? Should I use session variables? If I choose that option that, then should I switch from forms-based authentication and manually authenticate using session variables or use both forms-based autentication for web page access and store the username and hashed password in a session variable? What are the pros and cons of each?

View 2 Replies

Security :: Avoid Windows Login Userid And Password Window When Use Windows Authentication Mode For Website

Dec 30, 2010

I have been trying to avoid the windows login userid and password window when I use the Windows Authentication mode for a web site. I need to capture the the windows logon user name without prompting for the user id and password and display that on the web site. I had tried almost everything... changed authentication,security setups on IE and IIS etc... still not being able to avoid the window...

View 1 Replies

VS 2008 - Forms Authentication And Username Password Modal Dialog

Mar 6, 2012

I have the asp.net with authentication set to forms. After deploying new version on server it started to display a UsernName Password dialog box (like in windows authentication) on the login.aspx page.

When user click "cancel" the login.aspx page displays normally and user could log in and continue his work normally.

I don`t know how to get rid of that dialog box? Anonymous login on IIS is enabled, and the anonymous IIS user has access to that file - login.aspx

View 2 Replies

Security :: Get Login In Application Without Entering Username And Password In Digest Authentication

Sep 16, 2010

Foe getting Logon computer username i m using digest authntication mode. But when i browse website it's asking for username and password. while already windows login with the same username.

I understood that in this auhtntication mode it's required. But r there any configuration with it i am not getting this Prompt ? Any group ploicy ??

For IE i have added website into trusted zone but still it's asking for username and password.

R there any other way i getting Computer logon name in asp.net application. There are But only work when i run from Editor from IIS it's not retuning value.

View 2 Replies

Security :: HYH Virus Capturing Username & Password From Form Authentication Website?

Jan 24, 2011

One our customer complaint about HYH virus storing form authentication user credentials in clear text in his local system. Customer is accessing website through internet explorer. Is any preventing measure we can take in website or Code level?More details on Website1) Hosted in IIS 6.02) Windows Server 2003 Operating System ) Written in ASP & ASP.net combination

View 1 Replies

Active Directory Intranet / Get A Windows Prompt To Enter Username And Password

Nov 2, 2010

I have an intranet that gets the current logged in user through active directory. When a user is locked out they get a windows prompt to enter their username and password. Is there a way for me to catch this and redirect them to a page where they are asked to enter their credentials again or tell them that their account might be locked out and to contact the help desk?

View 1 Replies

Create A View In Database To Fetch Username And Password Of All Users Having A Particular Role (Forms Authentication)

Apr 29, 2010

I am using ASP.NET Forms Authentication for my application. I have made my Password Format "Clear", so no problems with the password encryption. I need to create a view(in SQL server) to display all Administrators in my System. ie aspnet_Roles.LoweredRoleName='administrator' The fields needed are UserName and Password

View 1 Replies

Firefox Asks For Username/password On Every HTTP Request With Digest Authentication Enabled On IIS6

Nov 12, 2010

I've recently enabled Digest Authentication on an intranet website/application I am creating for my company in ASP.NET.

The reason I have done so is because Windows Authentication seemed to only work for some users, and not for others. I could not figure out why nor do I know enough about IIS to try and trace the issue. After some trial and error, I found that digest authentication seemed to give me the behaviour that I wanted. That is: allow only users with a valid account on the domain to log in to the website with their credentials.

The problem now, is that Firefox (3+) seems to ask for the user to authenticate on every HTTP request sent to the server. This does not appear to occur in Internet Explorer (6+) or Chrome.

I've tried searching for solutions but I always arrive at dead-ends. I'll find a discussion about the issue, and every posted solution leads to a dead link...or it's on Experts Exchange and I don't have access to view to solution.

The issue appears to be related (from what I've read) to the way the different browsers send their authentication headers vs how IIS interprets them. I'm not sure what I can do to change this though? One of the solutions I had found mentioned writing an ISAPI filter to fix this, but of course the link to the finished filter was broken and I have no idea how to go about making one myself.

I've tried messing with the NTLM and other auth related strings in about:config to try and force Firefox to trust my server but that doesn't seem to work either.

From a few other sources I've read, it appears that everything should work if I switch back to Windows Authentication, but then I'm back at square one where the authentication would work only for some users and not others.

A solution for either problem would work for me, but I have very little information for the Windows Authentication issue. If someone could guide me through tracing the problem I'd gladly post more information for it as well.

[URL]

View 1 Replies

Security :: Passing An Authentication(username/password) To The Sharepoint Site (avoid Prompting Window?

Nov 18, 2010

We have a link in our site that pin points to sharepoint documents and we are retreiving some documents files (*.doc). Our sharepoint uses IWA (integrated windows authentication) which is prompted if we're trying to access that documents, unfortunately we don't want to prompt that window to authenticate the user. We need is to create a username and password and authenticate it. how can we do that.

Note* we have 2 server one for our application and the other one is for sharepoint.

View 3 Replies

Security :: Username And Password Are Being Passed In The Query String

Dec 9, 2010

Need to recognize that the username and password are being passed in the query string before generating the out put of aspx page.

Actually i wanna block unauthorized acces of my aspx page. That's why i set login.

My Login.aspx code is :

[Code]....

So URL

http://myyyysite.com/page.aspx?username=hhhhh&password=ppppp

Asp will need to recognize that the username and password are being passed in the query string before generating ouput of page

View 5 Replies

Security :: Change Password For Windows Authentication

Oct 12, 2010

Using windows Authentication... is it possible to progrematically change a password?

I tried using several ways to do this. I tried using the ChangePassword control. This tells me that minimun characters is 7 even though I have more then 7 characters... I also tried using this method:

[Code]....

The user is always null... and I am assuming this is because this object is indended to use with Forms authentication.

All I want to do is have an option for users to change passwords. Is this possible with Windows Authentication?

View 2 Replies

Integrated Windows Authentication - The User Changes Password And Is Prompted To Login Again - Why

Mar 22, 2010

I am working on an application that uses windows authentication. Within this application, we give the user the ability to change their password. The user can change the password just fine. However, after they change their password, that is when things get weird. Sometimes they can navigate through the application just fine. Other times, they click on a link and are immediately prompted to supply credentials. Occasionly they can click on a link but upon a second click they are prompted to supply credentials. Does the browser keep a token to the original credentials and use this when they request the next page? If this is the case, why can i continue using the site sometimes? Can I change the password and then assign that token to the request?

View 1 Replies

Security :: Haw To Provide On Credentials Page A User Name And Password If Use Windows Authentication

Dec 20, 2010

[Code]....

View 4 Replies

Security :: Password Prompt For ASP Website Hosted On Intranet Using Windows Authentication

Jul 8, 2010

We have developed a website in asp.net using windows authentication and deployed it on the intranet (IIS v6.0). Most of the times, when users try to access this website they are taken straight to the website, but occasionally some users get a prompt to enter their windows username and password. I understand that this could be caused because of several reasons like:

Cached active directory password. Recently active directory password changed. Active directory account locked out. I want to fix this issue for good because it is annoying the users.

View 1 Replies

Security :: Prompt User To Reset Password When It Is Expired Using Windows Authentication?

Mar 1, 2010

I have an Intranet web site that uses Windows Authentication and when a users password expires the do not get a prompt letting them reset it. We also have OWA and if they go there to check mail, it sends them to a page which allows them to reset it there. How can I trap for expired passwords and allow them to change it like they can with OWA?

View 1 Replies

Visual Studio :: Add Connection / Use SQL Server Authentication - Fails On Windows 7 Pro

May 5, 2010

I'm using VS 2010 RTM and SQL Server 2008 on my clean development laptop, running Windows 7 Pro.

Using Visual Studio's Server Explorer, I can easily do an Add Connection by simply right-clicking, and then completing the dialog, and choosing "Use Windows Authentication". I can then click the button "Test Connection".

However, if I wish to do an Add Connection, and then choose "Use SQL Server Authentication", I get a message "Login failed for user 'appSlir'", as shown here:

When I try the same thing on my other development machine, which is VS 2008, SQL Server 2008, and Windows XP Pro, it works fine.

There seems to be a problem/bug that prevents Add Connection with "Use SQL Server Authentication" to SQL Server 2008, when running on Windows 7 Pro.

View 5 Replies

SQL Server Connection String - Hide Password From Other Developers

Jun 1, 2010

We're migrating one of our sites to ASP.Net. We do not want to use integrated security, which uses the windows account to connect to sql server (not going to get into why, its just out of the question). We created a username and password to connect to SQL Server, and would like to use that username and password, however, we also do not want other developers to see this information (easily read from the web.config).... I know it can be encrypted, but it can just as easily be decrypted by the developers - plus encryption has a performance hit.

View 5 Replies

Security :: Impersonate A Connection To SQL Server Under IIS App Pool Account If Windows Authentication?

Aug 31, 2010

I have a requirement I should connect to MS SQL server under IIS Application pool account from ASP.NET application where Windows Authentication is enabled. I cannot use user name and password in connection string.

ASP.NET application should use Entity Framework 4.0 to work with data.

View 1 Replies

C# - How To Include Ampersand In Connection String Password After Using Entity Framework

Sep 29, 2010

I'm using Entity Framework 4 for a simple app and would like to bake my connection credentials into the following connection string:

<connectionStrings>
<add name="MyEntities"
connectionString="metadata=res://*/MyDataModel.csdl|res://*/MyDataModel.ssdl|res://*/MyDataModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhostDEV;Initial Catalog=MyDB;UserId=myUser;Password=jack&jill;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient" />
</connectionStrings>

However, the password (which I cannot change) contains an ampersand. ASP.NET throws:
Configuration Error: An error occurred while parsing EntityName. Line XX, position YYY.

If I replace the ampersand in the password with &, I get a SqlException: Login failed for user 'myUser'. Usually this trick works, but I'm guessing that something is failing because this is technically a connection string inside a connection string.

What should I do here? Most of my classes include code like:

using (var context = new MyEntities()) {
// do work
}

Update: It turns out that the credentials I am using are a domain account, so what I really need is Integrated Security=True in the connection string rather than a password.

Encoding the ampersand as indicated in the accepted answer should work fine, though I haven't tested it.

View 3 Replies

Security :: LoginView And Windows Authentication - Setting - User's Account And Password Checked By Active Directory?

Sep 19, 2010

i have a problem with the users authentication on my site. I made <authentication mode="Windows"> in my web.config. The LoginView shows "mycomputermyusername" if i request the page. So far as well. Now i want to login with a different username. Users are stored in an Active Directory. My questions: wich setting i have to do, that user's account and password checked by Active Directory? how can i force the system to make a new login? Logout doesn't work, i always see my on account.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved