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

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

VPN Remote Users - Get User ID

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :ASP.Net

 Wrote a website project for internal use.  Currently, retrieving the windows user id and working correctly.  Company has remote users signing in through VPN.  What if anything do I code to get the these remote users windows id?  According to the DBA, after signing on from the VPN screen the users do not have to log in their windows account it is done for them.

View Complete Post

More Related Resource Links

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Forms based users being prompted for windows authentication login for My Sites photos in user lists

Here's an issue I didn't see coming for our forms based authentication users. 

We have a web application extended to an external url to handle forms based authentication for users outside of our domain. Our setup looks like this...

Internal Users/Windows Authentication - moss.domain.com
External Users/Forms Based - mossext.domain.com
My Site for Internal Users - mysites.domain.com

When our forms based users are accessing user lists, or discussion pages that display user pictures, they are getting a windows authentication login for our internal users (mysites.domain.com) who have populated their my site with personal photo.

How do we fix this? 

Checking SQL Server User Roles and Creating SQL Server Users using VB.NET

Hello gurus!Firstly I want to apologies if this question is out of place here.. if someone can direct me to the correct forumn great and Thanks!I have a VB.NET application which uses its own Backend Database (MSSQL Server). I need to distribute this application to sites where there will be an existing SQL Server.So I will need to Create the Database on this server. The Application includes methods for building the database on startup if not already connected to one.However the users windows logon may not have the correct permission to connect and create a Database on the Server. I have a DB Setup form in my application which asks for the Servname, Username, Password and Database name. I have catered for Windows Authentication and SQL Server Authentication within the form - the user makes the choice.Assuming they enter a Username and Password for SQL Server Athentication then I will be trying to connect using this user and create the database on the given server. The following is my outline logic:-                                                                  Create db Process                                                                             |                                                                             |                                                               Check Credentials                                                                   / 

limitate user permission to edit other users documents

i have a list where everybody uploads documents, but i want that only the user that uploaded the document can edit it or delete it, is there a simple way without workflows or code? thanks!

FBA users (ldap provider) don't have any user profile info when logged in.... what am I doing wrong

Sharepoint 2010, Claims authentication, FBA using ldap membership provider and role provider against Active Directory.  User profiles all imported just fine -- used the LDAP FBA provider hitting Active Directory to do so too.  whenever an FBA user logs in, it doesn't seem like sharepoint is picking up any user attributes.  targeted audiences don't work and MY SETTINGS is blank other than account and name.  If the same user logs in but through Active Directory, everything works just fine... targeted audiences, etc. Am I doing something wrong or can I not use the LDAP provider to authenticate to AD and also use the user profiles from Sharepoint?  GRRRRR.  All this to get around the Windows Authentication popup so I can customize a better looking logon experience.  Help?

How to add a user to "Debug Users" group

I want a given user to be added to "Debug Users" group. This is what the requirement is. To be very frank I am not sure where I can see this group in the computer. I tried to locate this in "computer management" -> Groups but couldn't find it. Can any body please throw some light on this. Whats the use of this group, where can i find this & how to add a user to this group?

Changing a users role with RadioButtons (User is always in single role)

So I have a set of 5 radio buttons corresponding to the roles a user can have on my website.  I have been successfully able to retreive what radio button needs to be checked for the role the user is currently in... string username = Request.QueryString["username"]; // Get Access Levels and populate radio buttons. if (Roles.IsUserInRole(username, "Banned") == true) { RadioButton4.Checked = true; } if (Roles.IsUserInRole(username, "Member") == true) { RadioButton1.Checked = true; } if (Roles.IsUserInRole(username, "FOB_Employee") == true) { RadioButton2.Checked = true; } if (Roles.IsUserInRole(username, "FOB_Administrator") == true) { RadioButton3.Checked = true; } if (Roles.IsUserInRole(username, "Webmaster") == true) { RadioButton5.Checked = true; } My problem is I do not know what to do with the actual procedure of changing the roles based on the new radio button selection.  I have tried many different methods, including using if statements to check if the user is currently in the role, remove him/her from that roll, and then add the user to the newly selected role.  It appears, from my testing, that you can not

Error For Execute User Define Function in remote host.

Hi there.I wanna to call a user defined function in stored proc.it's ok in local test but in the host it rises error: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.MinCount", or the name is ambiguous.What should i do?

users are known in user profile, but not in security

Hi all, I am having this weird issue here: SP2010 was working fine, user profile sync and claims-based security on the web app. Now, with no clear reason, it cannot find users anymore on the security part. People search still works, but I cannot add users on SharePoint to log in. Strange thing is: if I type half a username, it still resolves the full name, but it has a red stripe underneath it as a sign that it does not recognize the user. So it can find the name of the user, but it cannot add it to SharePoint.   Once more, the user profile sync is working great and I can find users on people search.   Any thoughts ? 

Forms Authentication sending user to LoginURL on first hit of page even though page has [allow users

On the first hit, and only the first hit, to my page having [ALLOW users="*"] in the web.config, the user is redirected to the LoginUrl, but on all subsequent visits to the page, the user IS allowed access.  The user shoud ALWAYS be allowed access to this page.  I suspect it is a configuration problem, so here are snippets of my web.config... <compilation debug="false" strict="true" explicit="true" /> <trace enabled="false"/> <authentication mode="Forms"> <forms protection="All" cookieless="UseCookies" requireSSL="false" slidingExpiration="false" timeout="20" name="12345678-1234-1234-1234-123456789012" loginUrl="~/Web/Login.aspx" defaultUrl="~/Web/MyPage.aspx" enableCrossAppRedirects="false" /> <authentication> <httpCookies httpOnlyCookies="true" /> <sessionState cookieless="UseCookies" />         <location path="Web/Contact.aspx"> <system.web> <authorization> <allow users="*"/> <authorization> <system.web> <location>   Can you help me figure out why users are not ALWAYS allowed access to the /Web/Contact.aspx page? Thx!      

logging out users when user opens website in two browsers or two tabs of same browser.



We have the implement the following scenario in our application:

  1. We use windows authentication. User opens our website in tab1 and does some action but with out clicking on save he opens a new tab tab2 and opens the same website again.
  2. Now, if the user session in tab1 is active i need to warn users that the he is already logged on to application in some other browser and go to some log out page. But if the user session in tab1 is timed out then he must be able to continue with the website in tab2 as usual, but if he tries to do anything in tab1 he should go to session expired page.

I tried implementing it in following way.

  1. I have a hidden field in each page which will be set to unique Id using GUID.NewID().
  2. when user requests for a page the following code is executed.
  3. if (Request.Headers["Cookie"] == null)
                    //this means user is requesting hte page for first time.
                    //Generate a new GUID store it in session and also in the hidden variable on page.
                    Session["DefaultPage"] = Guid.NewGuid().ToString();
                    ((TextBox)page.FindControl("hiddenGUID")).Text = Session["DefaultPage"].ToString();
                else if (Reque

inserting data to Users Table in ASPNETDB from Create User Wizard


When a user starts a membership using the Create User wizard supplied by the aspnetdb profile service, I need to add a field to a table in aspnetdb and upon clicking the ContinueButtonClick insert some data.  The field I'll add is "SubscId".  My first question is what table is best for this - Users or Membership?

Secondly, what is the best way to insert new data for this scenario?  code behind?  markup?  Can someone provide basic syntax of insert code in code behind for this scenario?

Give permission to all users of a customized sharepoint portal, where all the user controls of the w

Hello there

I have created a sharepoint portal and customized it. I have created my own master page and there are many webparts implemented. This has been hosted in a MOSS server. When a normal user is trying to access the portal first thing in the morning, he is getting a "You are not authorized to view this page" error. But when a site admin access the site, there is no issue and he is able to access the site. The site admin does nothing in the site and once he has logged in to the site,  the user is able to access the site without any trouble.

I have found what was causing the issue. But dont know whats the fix for it.

The issue is...We were trying to place all the usercontrols created as part of our application in a seperate folder under ControlTemplate folder. This is what was not allowing the users who are not site admins. But it was ok, when the admin first accesses the same.

WHat is the fix for this ... to make the new folder accessable to all users ??

Kindly help...

Allow a non SA user to grant perms to other users


I have a challenge whereby a non sa user needs to be able to GRANT and REVOKE a fixed set of perms to SQL Login accounts that exist on a server as follows

Declare @usrlogin VARCHAR(255)

-- Grant the perms

USE master
EXEC master..sp_addsrvrolemember @loginame = @usrlogin, @rolename = N'bulkadmin'

Use TestDatabase

EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = @usrlogin
EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = @usrlogin

GRANT DELETE TO [@usrlogin]
GRANT EXECUTE TO [@usrlogin]
GRANT INSERT TO [@usrlogin]

-- Revoke the perms

What is the best method of leaving a cookie on a users machine and then looking it up when the user


I want to store a users dialect in a cookie on his machine, and then look it up before loading the version of my web app.  What is the code to do that.


Can a user with SQL express deploy a SSIS to a remote SQL server (how)


sql express does not have integration services.

dtutil does not work without integration services.  This is therefore not an option.

The deployment manifest needs dtutil to execute.  This is also not an option.

The documentation on microsoft states that a person can connect to remote integration services by editing the ini file and then connecting locally. http://msdn.microsoft.com/en-us/library/ms137789.aspx.  Without integration service, one can not connect locally to integration services so using the transfer package of sql server is also not an option.

Also connecting remotely to an integration without editing the ini seems to require local admin rights on the target server.  This is a bit too much to ask.  (this is what I experimented let me know if you know the exact requirements)

Is there a possibility for a person with sql express, without local admin rights to the target server, to push his ssis to his sql server test instance?

allowing remote users access to a specific site but not to any other network servers



I've been checking previous postings.  We are opening up a sharepoint site for partner companies. Once they get to their site we don't want them on any other servers on the network. 

I followed the info in previous postings and created a group called Computer_Deny, created a user and added them to that group.  I created a GPO and linked it to the default domain with the user right deny access to this computer from the network enabled and the Computer_Deny group added.  Removed authenticated users from the filtering and added the Computer_Deny group.

did gpupdate /force

restarted an internal machine for testing.  Logged on as the user I created, the user can't get to any server except the domain controller.  What I'm not sure about....they need to authenticate with the DC, I believe, once they finish their HTTPS entry and then need to get to the sharepoint server.  If that is true, the authentication process has to happen on the DC.  I would think the authentication process is different that a user trying to access a computer from the network.  Am I correct?  Am I least moving in the right direction?

The user can still access the DC various ways i.e. run command, entire network but NOT via RDP since that right has not been granted.  Some further research indicates that if

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