Forms Authentication - Connect To Database With Logged In Windows User In Intranet Web Application?

Dec 18, 2010

we are migrating existing windows form application to asp.net(3.5) intranet portal, there is a requirement whereby database connection should be made by the logged in windows user. Is it possible to achieve this functionality?

View 1 Replies


Similar Messages:

DataSource Controls :: Windows Authentication - Connect To Database From A Machine Inside Intranet / Login Failed

Jul 18, 2010

I am getting this error when trying to connect a database from another computer in my home network:

System.Data.SqlClient.SqlException : Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

this database is using windows authentication. sqlserver 2008.

What is the connectionstring that I need to use in order to get the database?

View 1 Replies

Security :: Intranet Web Application Using Windows Authentication?

Jan 7, 2010

I've a project using windows authentication and it will be used in intranet. The client itself already have a web application in their intranet and they built it with Java (they used windows authentication too). The problem occur when they want my web application only appear within their application content section.

What should I do? I did think about using iframe but some people said it's evil. And if I'm going to use iframe, is it save? My web application will use a few pop up window/modal window and ajax.

View 5 Replies

Windows Authentication Of Intranet Website And Reappearing Windows Login Box

Mar 24, 2011

I'm trying to enable automatic Window authentication working on our ASP.NET Intranet. I've changed the Authentication on our IIS 7.5 server from Anonymous to Windows Authentication Enabled only, and changed the Web.config file for the website to:

<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>

The Windows login box appears when accessing the website via IE 8, I enter valid credentials, but the login window keeps reappearing as if it does not accept my credentials. By repeatedly cancelling the login box it disappears, and my login name can be viewed on the website. Is there any possible reason for the login box to keep popping up even though valid credentials are being entered? I've restarted the servers / cleared browser cache etc. Also, ideally I would like the user to enter the login details once in the login box and not be required to reenter login details whenever he reopens the browser.

View 3 Replies

Security :: Use Windows Authentication But Only In Intranet?

Jan 9, 2010

We also have sales rep that take call and use the same website to take the orders.

My boss wants me to allow the SR to only be able to take orders if they are in the network itself. When I ask why he tells me "just because".

I'm sure there's a way but I can't see it at the moment. How do I go by doing that? Also keep in mind that if the SR is outside the intranet, he can't be allowed to enter his active directory login/password (so the login window must not even show).

View 3 Replies

Silent Windows Authentication - Intranet Zone

Jun 28, 2010

Do any of you guys have experience using Active Directory and the Intranet Zone to silent authentication with a local web site? I've done it in the past with 1.1 and 2.0 .NET, but this 3.5 site I have written doesn't seem to be working for some reason.In the past, how I have done it is:

In web.config, set:

<authentication mode="Windows"/>

In IIS 6, under directory security, check Integrated Windows authentication and Digets authentication for Windows domain servers, and set the realm to my domain, and uncheck Enable Anonymous access.The I add the Host Header for the site to the corporate Intranet Zone in Internet Explorer under trusted sites using Active Directory.And that's basically it. I've done it on plenty of intranet sites before, but with this 3.5 application I am still being propped to login. Anybody see any steps I missed?

View 12 Replies

Security :: 3.5 - Set Up An Intranet Site With Windows Authentication

Jul 26, 2010

i m trying to set up an Intranet site with Windows Authentication. I have configured the web.config as shown below.

<authentication mode="Windows">
<roleManager enabled="true" />

I wanted to do authorization by roles so

<authorization>
<deny users ="?"/>
<allow roles="D820MySite_Developers, D820MySite_Admins"/>
</authorization>

I'm in the D820MySite_Developers group. When I attempt to login, it wants my password. I thought that with Windows Authentication it should not prompt for the password. If is use <allow user="*"/> it does not.

1. Is this the correct behavior?

2. My aspnetdb does not appear in the App_Data folder. Should it and is this causing the problem. If it should be there, how do I get it there?

3. I was under the impression that by using Windows Authentication, I can prevent users from accessing pages by folder. Is this provided by IIS or is this provided by Windows (using Windows Explorer)?

View 3 Replies

Security :: Windows Authentication On An Intranet Site

Mar 23, 2010

I'm trying to set up Windows authentication on an intranet site. I have this code in the web.config:

<system.web>
<authentication mode="Windows"/>
<authorization>
<allow users="domainuser, domainuser2" />
<deny users="*" />
</authorization>
</system.web>

I can log in with my own credentials, but I have virtually all the rights in AD. User2 can not log in. The website is set to use Windows authentication in IIS manager. And I've tried setting permissions in IIS manager and NTFS permissions for the folde

View 3 Replies

Security :: Intranet Website Using Windows Authentication And IIS Restart

Dec 6, 2010

We are having an issue with the windows authentication and IIS restart for asp.net application Our environment is an intranet site (an asp.net application ) that uses windows authentication, uses integrated security application pool, physical path credentials are set for a service account, who is admin for sql server, IIS etc. web.config - Connection string has Integrated Security = true, authentication = Windows, and authorization - deny *, allow = security group. Anytime we start - stop service (or restart) (IIS); and hit the website thru some other machine IE, it fails to show the website (401.2), and any subsequent hit to the website doesn't go thru.

However when we start the service, and hit the website on server's (where website is deployed) browser first time then everything works fine for subsequent hits from anywhere as long as authenticated on corp net and member of security group configured in web.config. This behavior however goes away if we uncheck the configuration "Enable Kernel-mode Authentication" on the asp.net application. ( but then Firefox browser stops working with this configuration!!) Why such behavior? In the documentation it states its recommended to keep it enabled. What is recommended way of publishing a website with windows authentication enabled? Any side effects of "Enable Kernel-mode Authentication" being unchecked ( other than what we found for firefox not working) Environment : IIS 7.5 windows 2008 Server R2, VS2008, SQL Server 2008, ASP.NET 2.0

View 5 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

SQL Server :: How To Connect Database In Sql Authentication Mode Rather Than Windows Mode

Oct 16, 2010

I wanted my local iis running application to connect my database in sql authentication mode rather than windows mode,

but it is showing errors of " Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'DBUser'. ". i also ublocked port from firewall,and allowed remote connection of mssql from sql manager, enabled TCP/IP and named piped protocols from SQL surface config, and with sql manager i also changed server authentication mode to sql from windows.
my datastring is <add connectionString="Data Source=PARTHIV-PCSQLEXPRESS;Initial Catalog=aspnetdb;User ID=******;Password=******/" name="LocalSqlServer" providerName="System.Data.SqlClient" />

i made a user named DBUser in database as well i don't understand where it gone wrong ???

here is error log

[Code]....

View 4 Replies

Security :: Running Application Under The Security Context Of The Logged In User (LDAP Authentication)

Mar 17, 2011

We are using membership provider for LDAP authentication. It is working as it should.

But what all configuration settings I have to do so that
all the future requests to this application run under the security context of the Logged in user account not through the some default user set in IIS.

We need to have this working because all the permissions on the database are based on the logged in user.

We are using form authentication for LDAP authentication. And having impersonation = true in web.config.

View 1 Replies

VS 2005 - Intranet Windows User Name

Feb 26, 2010

I have been tasked with creating an intranet site and have been able to do everything so far (leaves the door open wide, I know ) EXCEPT get the username that the person is logged in as under their own computer.

<system.web>
<pages styleSheetTheme="Black"/>
<customErrors mode="Off"/>
<compilation debug="true" urlLinePragmas="true"/>
<authentication mode="Windows" />
<identity impersonate="true"/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
</system.web>
Under my master page I am doing this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Environment.UserName.Length > 0 Then
username.Visible = True
username.Text = Environment.UserName
Else
username.Visible = False
End If
End Sub

All I am getting is the ASP account name....what am I doing wrong??

View 5 Replies

Connect To SQL Server Using Windows Authentication ?

Dec 17, 2010

to connect the MS Sql server 2008 using windows authentication in ASP.Net 4.0 without change IIS user (ASPNet) permission.

View 1 Replies

Display Email Of Logged In User / Forms Authentication

Sep 30, 2010

i'm using forms based authentication within my aspnet (c#) website. At the log in page i'm capturing username, password and email. the email addressed is stored within the membership table. now on a new page, i'd just like to display the users' email address so they update it as well as another boolean field. i've tried using a gridview but i can't figure out how to modify the query so it only reveals the current logged in user.

View 1 Replies

Security :: Have "Role Management" For An Intranet Website With Windows Authentication?

Apr 16, 2010

To work with the ASP.NET 2.0 Membership and Role, we will use Forms authentication for the public Internet.
On the other hand, we use Windows authentication for Intranet applications. uestion: In a website with Windows authentication, can I still have some kind ofole management for different
groups of the Intranet users? If yes, how?

View 2 Replies

Connect To SQL Server Using Windows Authentication And Specific Account?

Feb 21, 2011

I have an ASP.Net app, that runs using windows authentication. The connection to the SQL Server is usually done by creating a sql server account and using that in the connection string.

However, in this specific very restrictive hosting environment, we have been asked to use a specific WINDOWS/active directory account to connect to the SQL Server.

note it is not the windows credentials of the user of the website, we need to connect to the SQL server with - it is one specific windows/AD account.

How do I configure that in my connection-string?

View 2 Replies

Security :: Logged In User's Userid Connect To A Detailsview?

Jan 14, 2010

I have a gridview nested inside a Loggedin Template so when a user logins it will display their own details (name, address etc) When i attempt to run this i get this error message:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[Code]....

View 21 Replies

How To Get Windows Logged In Username In Application

Jun 11, 2013

How can I assign logged in windows username as a parameter to sqldatasource in ASP.net web forms.

View 1 Replies

How To Connect SQL Database On Website From Windows Forms App

Jan 16, 2011

I've returned again to my problem of trying to connect to the SQL database on my website from a Windows forms application. I had some success but then I was playing around with some things and deleting stuff etc to see what would happen. I deleted the Database that I successfully connected to and added a new database for reasons I won't go into. Now when I try to connect to the new database I don't have success.

View 39 Replies

Authentication - Where To Store The Username Of Logged In User

Sep 29, 2010

When a user log into my asp.net site I use the following code:

FormsAuthentication.RedirectFromLoginPage(userid, false);

As I often need to use the userid I can then later get the userid by:

string userid = System.Web.HttpContext.Current.User.Identity.Name;

Now I also want to show the logged in username on each page and my questions is therefore where do I place the username best if I need to use it on every page. User.Identity.Name is already taken by the userid so I can't use that one. Another solution would be to get the username from the database on each page, but that seems like a bad solution.

View 4 Replies

Installation :: Intranet Database Application Not Accessible?

Feb 6, 2010

I have created an ASP.NET database application using SQL Server express on one of my home network PC's. I can access SQL Server Express from the other PC's (using SQL Server Authentication) so I know it is set up ok for network access. I can run the web site on the host PC under IIS & everything works ok.

When I try to access the application from another PC using http://192.168.0.8/TestApp/Default.aspx it is not available. I can ping 192.168.0.8 & it is accessible.

why I can not view the web site from another PC on the network?

View 2 Replies

User Controls :: Get Client IP Address And Logged In Username Of Windows System

Mar 3, 2014

I need client ip and login user name of a system, while using my web application in ASP.Net ....

View 1 Replies

Windows Application Needs To Connect To Web Service To Pull Data?

Sep 22, 2010

I have an existing windows .net application that has an access database as the backend.

I want to place the access database on a web server and it was suggested that I create a web service in order to communicate with the database.

I've been looking at some tutorials but am still confused about the basic config needed. Here's some questions I have:

1) Does the web service need to be created inside my current project by right clicking on the solution and choosing to add a new web site...and then selecting web service?

2) If it's set up like this, what files do I place onto the web server?

3) Where does the database reside? Do I need to place the database inside the web server that I create?

4) My current project has existing sql that gets data and I'm uncertain how to re-write in order to retreive the data. e.g. which part goes into the client and which part goes to web service pages? here's an example of a procedure that currently exists...I'm getting data to populate a dropdown:

[code]....

View 8 Replies

Security :: Membership And Form Authentication / Logged In user Can See Content Of Pages They're not Suppose To?

Oct 19, 2010

I am having an issue, with the membership and form authentication. I am having a problem where when an logged in user types a url they can see the content of pages they're not suppose to. When the user tries to click on the screen or any ajax fires they are redirected to the main page. What is going on? I have all the items setup in the webconfig properly just wondering what is happening. Also I don't want to use a redirect solution for each page since that is what I thought webconfig was setup for.

View 1 Replies







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