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
Similar Messages:
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
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
May 7, 2010
Is it possible to run a SQL Server 2005 job from an asp.net intranet page? I've been opening up SQL Server 2005 and manually running this and thought it would really be convenient if I could just click a button on a web page instead.
View 2 Replies
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
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
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
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
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
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
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
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
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
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
Jul 16, 2010
We are using IIS6 and .Net Framework 2.0 for our intranet with Windows and Digest Authentication . We have 2 domains that have access to this intranet. I suddenly have the need to display slightly different content for users from Domain A. The changes are rather trivial (text on a label and and image in a header) but important to our stakeholders.
View 4 Replies
Feb 7, 2011
Show Authenticated user on Intranet:
Response.Write("UserName is: " + User.Identity.Name);
In Web.config:
<authentication
mode="Windows"/>
<authorization>
<allow
users="?"/>
</authorization>
This works fine on local server. But not on Intranet.
On Intranet, it was working fine on IIS 6.0.
But on IIS 7.5, the user doesn't get authenticated.
View 3 Replies
Jan 27, 2010
I want to make a user control in asp, can i inherit from a windows control to do it? the book i have says i can inherit from any .net control, so i dont see why not but want to be sure
View 4 Replies
Jul 7, 2010
We have a website portal hosted in Windows 2003 server. For security reasons we are using different windows Login user say (xxxx) for signin other than Administrator. Now with this user (xxxx) name I installed .net Windows Application. It was working fine. For some reasons I renamed the original windows Login user(xxxx) to different say (yyyy). Now this .net Windows Application is not working with (yyyy) and even it is not allowing me to uninstall it.
View 3 Replies
Apr 9, 2010
I have made a Virtual Directory in XP. I have files with no extension. When I click on those files they are downloaded perfectly from a XP Server. However when I made the server on Windows 2003 Server. I got problems downloading these files. What should I do in Windows 2003 Server Settings? Or should I do something with my code. I am pretty sure that I will not have to disturb my code as it is running fine on XP
View 6 Replies
Dec 12, 2010
Does anyone have a good tutorial and location of download for SQL server 2008 instructions. I have windows 7 home 64 bit. I have 2005 already on my system and want to update it without any issues hopefully.
View 4 Replies
Sep 8, 2010
This may seem simple but for some reason I am having a problem.
I am trying to install SQL Server Express 2005 on Windows XP Service Pack 2 which has not been online for a while.
Everytime I've tried it has told me that it doesn't meet the minimum requirements. I am not sure if its because I am sick and dazed out.
View 1 Replies
Oct 20, 2010
I have a web app that runs on local and use merge replcation using sql server 2005 standard on the server and sql express 2005 on clients on XP. As you know, XP Pro laptops are getting hard to find. We are trying to change to Windows 7 Pro x64. I installed SQL Express 2005 and I don't see a subscription on "Sync Center" after I created local subscription using SSMS. I normally see the subscription in Synchronize in XP Pro right away.
I googled about this issue and not really have a good solution. There is one link saying Windows 7 not supporting Express 2005 anymore. [URL] If so, I would like to know what would be a solution such as can I use Sql Express 2008 R2 instead of Sql Express 2005 for client even if the server is still SQL Server 2005 Standard edition. We are planning to upgrade, but we need to hire 5 to 10 people now. My boss does not want us to keep using XP Pro.
View 4 Replies
Aug 4, 2010
My issue today is that i have a MySQL Database and am using the security framework provided by the ASP.NET Membership and Role Providers...I override the default methods with my own MySQL.
Now the issue comes in when i someone would like to have their password reset. My application is running entirely on an Intranet so i cannot have their passwords emailed to them. Is there a way i can have this information displayed in any way so that the user can use it to Log Reset, Create Accounts or Recover their lost passwords on an intranet without the administrators intervention?
Recently i had an approach as follows. In my web.config<system.net><mailSettings><smtp deliveryMethod="pickupDirectoryLocation" and my location was a folder on C drive as c:/SavedPasswords. Now i understand this was such a big security threat and thats why i am looking for a better option.
I would have that folder created using my System.IO and then the Mail is dropped into that folder. Then after the process is successful, i tell the user to check into that location and Read its content.
Then there is a global variable that is set to true...meaning that the folder at c:/ has been created. then there is a Method in a certain class that once it sees this variable True, it reads the readers c:/ and deletes that folder "save" if it exists;
View 2 Replies
Jul 6, 2010
I have developed one software in C# and the database used is sql server 2005. I have completed the software but now I want to provide setup in a autorun CD to my customer. I have prepare setup but I am not able to deliver my database along with my .net code. What I want to do is when user will install my project on his computer using the CD I am suppose to provide, it should install SqlServer Enterprise edition and should use this database. It may means that, setup should create database on the user computer.
View 1 Replies
Jan 30, 2011
get the below error. My application was working fine until I probably modified something, but don't know what.
Server Error in '/' Application.
Method is only supported if the user name parameter matches the user name in the current Windows Identity.
Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.
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:
[ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.]
System.Web.Security.WindowsTokenRoleProvider.GetCurrentWindowsIdentityAndCheckName(String userName) +2195661
System.Web.Security.WindowsTokenRoleProvider.GetCurrentTokenAndCheckName(String userName) +36
System.Web.Security.WindowsTokenRoleProvider.GetRolesForUser(String username) +61
System.Web.Security.RolePrincipal.IsInRole(String role) +182....
View 1 Replies