.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Domain.com/UserName vs. Domain.com/Default.aspx, how can I do a regular expression to get UserName

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF


I am trying to set up my IIS URL Rewrite and I am having a hard time figuring this out..


Right now I have a regular expression to find Domain.com/<username>User   RegEx: ([a-z]+)User


This option above is not stable at all, I want to be able to have the ability to do Domain.com/<username>, but at the same time if someone visits Domain.com/Default.aspx, the regular expression shouldn't find a match and should ignore this rule, any ideas?


View Complete Post

More Related Resource Links

Display Full Name in SharePoint instead of Domain\Username

My SharePoint 2010 server started displaying the users with the Domain\Username standard instead of using Full Name (as it did up to yesterday). This in all pages of the sites (persmission settings, document libraries, tasks, etc.) Does anybody knows how to force SharePoint to display users with the "full name" standard? Thank you.Plo

"The username is invalid. The account must be a valid domain account."

So I'm at the SharePoint Products Configuration Wizard, I put in the Database Server and name then put in the username and password. It just keeps saying this message after I hit the Next button! :   The username is invalid. The account must be a valid domain account.   What's wrong?

The specified user account "domain\username" is a local account. Local accounts should only be used

HI Im getting this error when trying to set a new Service account for my performance point services. SharePoint is installed in a single server enviroment. I can´t get a new service account configured and I think this is causing my server to run slowly. Any help would be highly appreciated thanks

Logon to SharePoint 2010 requires \. Why?

We've installed a fairly large number of small SharePoint 2007 environments. All of these have had their own Active Directory, specified to <domainname>.local. These have been accessible from Internet, and have simply had a external DNS pointingwww.<domain>.com to the server.  In these SharePoint 2007 environments we've used Windows Authentication, and logging on has simply been a procedure of specifying username and password. It has worked just fine. However, in our first SharePoint 2010 environment, we're encountering odd problems. We use here NTLM authentication, and  domain name is <domain>.local. The domain name used in Internet iswww.<domain>.com, which points to the SharePoint 2010 environments frontend server. We'd like to login to the SharePoint environment with simple <username> and password, but it fails. We have to explicitely specify <domain>\<username> and then password to login. Why doesn't this work, and is there any relatively easy way to fix this without disturbing the environment? From logon attempts using simply username, these events appear in the Security event log: Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 7.5.2010 13:15:01 Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: <COMPUTER>.<

Get system logged In Domain & username

Hi, I got a website with FBA authenication. I  want to get the client machine's domain & username. After lot of goggling I got the thing that if Enable annonymous is Check then it is not possible to get these things and would return "" whatever you try like HttpContext.Current.User.Identity.Name Request.LogonUserIdentity.Name Environment.UserDomainName.   Does anyone knows how to get the client's system domain & username.    

display of username in "domain/user" instead of "surname givenname"



we have a Sharepoint server 2010 running and at the top right of the website the username is showing like domain\username.

The same thing in documentlibraries and lists.

How can I change this to "surname givenname"?


I have configured a userprofilsync with our Domaincontroller and all of our users can be found in the Sharepoint Central Admin User Profils section with the correct Name.



Obtain domain username without requiring authentication


I'm bangin' my head against the wall here.  I'm not even sure what I want to do is possible.

I have developed an ASP.NET app that will only be run on my local network (which incorporates a Windows Domain).  It's running on IIS 7.5.

I want to do this:

Dim username as string = Httpcontext.Current.User.Identity.Name

My problem is this: If I don't turn off Anonymous Authentication and ASP.NET Impersonation, I don't get the results I'm looking for.  (if Anonymous is allowed, I get an empty string returned for username, and if ASP.NET impersonation is allowed, then "username" is always whatever account is associated with impersonation, like "Network Service").  If I turn those off and then turn Windows Authentication on, it works, but only after a dialog box presents itself asking for the Windows Credentials.

What I'm trying to do is NOT require the users to log in.  Since they've already logged into the domain when they signed on their computer, I'd like to just allow them access to the ASP.NET application I've written, and identify who they are (based on their previous Windows login) using the line of code above.  I don't need them to re-authenticate, because they're already a

How to get Clients Machine User credentials Username and Domain


I am trying to retrieve the loged in userName and Domain of the Clients machine. 

 string IP = (string)Request.ServerVariables["REMOTE_ADDR"];

 string IP = (string)Request.ServerVariables["REMOTE_ADDR"];

   Able to retrieve the Clients Machine IP but need to get the Remote Computer User details.


To find windows domain name and username in sql server


Hi experts,

 Any one pls tel  me the query to find the current working domain name with username in sql server.



Query to find the domain and username


Hi experts,

 Any one pls tel  me the query to find the current working domain name with username in sql server.



FAST Search Server 2010 Config Error - ValidationException 1034: Username or domain is incorrect.



I've seen other related threads and I've tried all the tricks in getting through the post-setup configuration, but I can't get by the "ValidationException 1034: Username or domain is incorrect." error message taken from the FAST psconfig log. I've tried both the wizard and the psconfig, but get the same results. I'm attempting to deploy the single server (stand-alone) on a single x64 box, under ws2008 SP2, w/SP2010, the server is also the domain controller, and i've been passing the FQDN to the post-setup script as described in the FAST deployment document (see log below):

Verbose [1] PostSetupUI - Displaying next panel :Enter the user name and password
Verbose [1] PostSetupUI - Displaying button set to the default settings
Verbose [1] PostSetupUI - Next button clicked
Verbose [1] PostSetupUI - Starting to process form data of panel :Enter the user name and password
Verbose [1] PostSetupUI - Collecting input parameters from the text input controllers.
Verbose [1] PostSetupUI - Collecting value:dev.devnet.com\fastuser of input parameter: userName
Verbose [1] PostSetupUI - Adding config parameter: userName for the next validation parameter batch
Verbose [1] PostSetupUI - Collecting value of input parameter: password
Verbose [1] PostSetupUI - Adding config parameter: password for the ne

"Full Name" instead of "domain\username"

I've been playing around with a new SharePoiunt 2010 installation the past few days. I have created a few sites, and have been assigning users to roles within the sites. For most users, they are added with their full Display Names, but in other instances, the users are added with "domain\username" instead.

It seems that it is always the same users that are giving me problems, regardless of what site I am assigning them rights to.

Any help appreciated,
J. Jespersen

Users display as "domain\username" rather than "firstname lastname"


Hi All,

     In my new 2010 setup, I see domain\username instead of their firstname lastname in the top-right-hand corner. How and where can I set up to show firstname lastname. I apprciate your response.



When Adding users some show as domain\username others as full name


When adding users to SharePoint site some show as Domain\Username while others show as "First Name Last Name". once of the users that show as Domain\Username is noticing some strange thing with his access.

I tried to remove the user that shows as domain\username and add again but still appeared as domain\username.  Also, when I click on the link for domain\username I get message "the webpage cannot be found", while for the users that show as First Name Last name I am able to view their User Information page.

Out of some 40 users I only have 4 that show as domain\username.

Anyone know what is the cause or a fix?

UPDATE: I went to SharedServices1>User Profiles and Properties>View User Profiles and there are 10 profiles listed inlcuding my owne. :)  For some reason when I go to our http://sitename and go to site settings>people and groups and click on one of the 10 user names I get page cannot be displayed.  Maybe now I have two issues instead of one.


Default domain logon on sharepoint



I don't want anymore to type DOMAIN\username every time I want to connect in my sharepoint 2010 (W2k8 R2) from my home pc for example, how can I do this?

Thank you,

Sharepoint 2010 error on username in ASPX code


Here is the error:

Web page error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Tue, 2 Nov 2010 20:12:57 UTC

Message: Expected '}'
Line: 1076
Char: 440
Code: 0
URI: http://my.local.sharepoint2010server/Lists/TreatmentRoomB/calendar.aspx

I have reset the users profiles and even had the user use a different computer. here is what I think the deal is. Her last name is "O'Tool", and when the list is generating the calendar view it is freaking out... could it be the "'" in her name?

I have tried to go to the back end database and remove her, or at lease change the name.. but can't find the information.

the page works great for anyone else, even on the same computer?  



regular expression thar allow except ".aspx" this string


hi i am new in regular expression

can anybody understood me how can i make a regular expression that

allow all the mismatch case  and don't a match case

ex: ".aspx"

( when i put any thing in text box it allow ----a ,ab ,adn.jpg ) result=true

(but when i put =.aspx ) result= false  

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend