I made a copy of our company website to a new server, planning to create a test environment. Both servers run IIS 6, and both are configured the same (except for where the configuration gives a server name.) All folders have the same permissions.
I cannot get the user authenticated.
As a last resort, I have this on a test login page:
ProtectedSub LoginButton_Click(ByVal sender asObject, ByVal e as EventArgs)
If Membership.ValidateUser(MyUser, MyPassword) Then
Feedback.Text="User not validated"EndIfEndSub
The second page has this code:
ProtectedSub Page_PreRender(ByVal sender asObject, ByVal e as EventArgs)
If User.Identity.IsAuthenticated Then
Feedback.Text = "User was authenticated"ElseIf User.Identity.Name = ""Then
Feedback.Text = "No user found"Else
Feedback.Text = "Not authenticated: " + User.Identity.Name
When I run this on the live server, it acts as expected: clicking the button transfers to Login2.aspx, and the literal on the page shows User was authenticated. Running this on the test server will transfer the page (meaning that the user is being validated) but show No user found, meaning that the user was not authenticated and there was no valid identity.
Any suggestions on how to fix this problem? I would rather not be mucking around with the live website that brands my company.
I didn't move the authentication database; both the old and new sites use the same connection string. The fact that Membership.ValidateUser is validating the user would seem to show that it is not a database problem.
Again, the issue seems to be that the authentication cookie for the test site is not being persisted.
I've a java webservice and would like to invoke it in .Net application. For that I created a .Net console application and added the webservice in service references.
It was added successfully and created the object to invoke functions of webservice. But I'm able to access only variables, not methods of webservice. Had I missed anything? Please correct me to access the functions. Thanks in advance
I am using vb script to open save dialog box in asp.net. This works fine in xp but it is not working in vista or windows 7 . I am using following code to execute the script
set objDialog = CreateObject("SAFRCFileDlg.FileSave")
objDialog.FileName = "C:\Scripts\Script1.vbs"
objDialog.FileType = "VBScript Script"
intReturn = objDialog.OpenFileSaveDlg
if intReturn Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(objDialog.FileName)
For this you can use ASP.NET memebership. It will do everything for you including db etc. You just need to run aspnet_regsql command to create your database.
For details have a look to the following links Link 1 Link 2
Let me know if you have any other requirement.
Thanks brij for the quick reply..
I think this article elaborates Role base authorization. I want to develop User based authorization where every user will have different access rights. for eg. suppose I have a form testform.aspx . Now some users can read, some can modify, some can delete like this.
Any suggestion for this ?
Hope this is right place to post this issue. If not, please let me know the right forum.
I've a webservice and I would like to access the webservice using activeX control. I'm new to activeX concept. Can you please guide me to achieve this. Thanks in advance.
Last Visit: 31-Dec-99 18:00 Last Update: 15-Oct-21 9:45