User1389651474 posted
I have been following the guidelines at
http://www.asp.net/learn/data-access/,
http://www.asp.net/learn/data-access/tutorial-72-vb.aspx (timeout in Select command) and
http://www.asp.net/learn/security/. I have also use Profile, User Roles and User Identity (using Window authentication mode).
Based on those guidelines,
I have developed ASP.NET web application with VS 2005 and SQL 2005. I only found out that I was developing it on "Visual Studio Development Server" mode. I tested everything and it was all great.
In order for you to understand how I use Profile, User Roles and User Identity, I have attached sample of code them which I use on my application.
Does anyone here have any tips/information how to deploy my application from "Visual Studio Development Server" to a production environment (Intranet environment, since I am using Window authentication mode).
I will be eternity grateful if you could give me any information to enable me to get start on deploying my application.
Snippet Code of Profile, User Roles and User Identity
Dim User
As Principal.IPrincipal = System.Web.HttpContext.Current.User
Dim UserProfile
As Object = HttpContext.Current.Profile
If User
Is Nothing
Then
Response.Redirect("~/InvalidUser.aspx")
ElseIf Roles.GetRolesForUser(User.Identity.Name).Count > 0
Then
lblWhoLogOn.Text = User.Identity.Name
Else
Response.Redirect("~/InvalidUser.aspx")
End
If
End
If
If (UserProfile
Is Nothing)
Then
MyStyleSheet.Href = "css/tdtssmaller.css"
UserProfile.SetPropertyValue(cFontProfileName, "tdtssmaller.css")
ElseIf (UserProfile.GetPropertyValue(cFontProfileName).ToString =
String.Empty)
Then
MyStyleSheet.Href = "css/tdtssmaller.css"
UserProfile.SetPropertyValue(cFontProfileName, "tdtssmaller.css")
Else
MyStyleSheet.Href = "css/".ToString & UserProfile.GetPropertyValue(cFontProfileName).ToString
End
If