Hi,

I am using VS 2008 express edition. I want to use asp.net configuration tool .But when i execute the tool it is not working. It display this message in browser 'An error was encountered. Please return to the previous page and try again. '. even though i refresh the page it is not working. Please help me to solve this problem.

Dani AI

Generated

Short answer: that generic WSAT message usually means the Web Site Administration Tool hit an exception while trying to initialize your membership/role provider or connect to its backing store. WSAT runs as its own small web app, so problems that don't break the site (missing provider assemblies, bad connection strings, SQL service down, permissions) will still make the configuration tool fail with a generic error.

Practical checks (in this order):

  • Try the ASP.NET Configuration tool against a brand‑new empty Web Site/project. If it works there, the problem is something in your web.config or a custom provider in the app.
  • Temporarily enable full errors so you can see the real exception (revert this after diagnosing):
    <system.web>
    <compilation debug="true" />
    <customErrors mode="Off" />
    </system.web>
  • Check Event Viewer → Windows Logs → Application for the ASP.NET/.NET exception and stack trace.
  • If you use the built‑in SQL providers, run the ASP.NET SQL setup (aspnet_regsql.exe in the Framework\v2.0.50727 folder) or use the wizard to ensure the membership/roles tables exist, and verify the SQL service and the connection string.
  • If you have a custom membership/role provider assembly, copy that DLL into the ASP.NETWebAdminFiles application's bin folder (the Web Admin tool needs the provider type loadable) or install it into the GAC.
  • Try running Visual Studio as Administrator in case of permission/machineKey access issues.

Notes tied to earlier replies: ’s API approach is a good fallback for managing users, but the “Roles are not enabled” exception that saw happens when roleManager/provider isn’t properly configured — simply enabling a tag without a working provider will still cause WSAT to fail. ’ reinstall suggestion can help if .NET/VS bits are corrupted, but use that only after the steps above. If the full exception is available, post the stack/inner exception — that will point exactly to the failing provider or resource.

Recommended Answers

All 4 Replies

Do you want to add users,or roles ???because there is an alternative way to go about it using the User/Role Managemnt API..If you need help with this just post any further questions,For intstance the code below shows you all the users ,similiar to the users you would see on the asp.net configuration Tool.

if (!Page.IsPostBack)
       {
          GridView1.DataSource = Membership.GetAllUsers();
          GridView1.DataBind();
              
       }

Thank you Samacoba. I tried your code but it throws an exception ' Roles are not enabled'. Actually i want to execute the configuration tool anyhow .

chances are, on your web.Config the Roles are not Enabled ,Add the Following lines on the Web Config.These lines go under the System.Web tag on the web Config.
Adminitrator and Role One are examples of possible roles.

To be honest the error you have has never occured for me.

<roleManager enabled="true"/>
		<authentication mode="Forms"/>
		<authorization>
			<allow roles="Administrator"/>
			<allow roles="Role One"/>
			<allow users="?"/>
		</authorization>

Just reinstall visual studio 2008 because when you install your disk may leave these files.this is installation problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.