| Greg's profileGreg Olsen - Yellow Duck...PhotosBlogLists | Help |
|
|
March 10 Failed to access IIS metabaseWhat is this all about? You may get this error when you attempt to browse a site hosted by IIS. Problem: The problem can occur due to the order that some of the install components were installed on the machine, normally because the .NET Framework (i.e. .NET 2.0) or Visual Studio 2005 was installed before IIS. Therefore, ASP.NET is not correctly configured to execute. You can also get this error if a particular user account doesn’t have access to IIS metabase. Solution: I have successfully been able to fix this issue by running the following command: aspnet_regiis –i Run this command from the Visual Studio Command Prompt (from the Visual Studio Tools start menu) or by using DOS command prompt and navigating to the following location C:\Windows\Microsoft.Net\Framework\v2.0.50727 and then run aspnet_regiis –i The command aspnet_regiis –i will install the ASP.NET and update IIS metabase. Hope that helps! July 02 Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'Well I got this error last week on my ASP.NET 2.0 Web Application im currently developing and thought what is happening here? I haven't hit this error before?
THE ERROR:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login' Source Error:
Line 120: public security_login_aspx() { COMMENTS: So I thought I would do some googling on the issue and stumbled across it within my search and it seems im not the only one who has hit this.
From reading a number of posts and Microsoft feedback (see: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102543) it does relate to the naming of the objects during compilation.
SOLUTION:
Be careful when naming aspx pages! To get around the issue I simply changed my Login.aspx to SignIn.aspx because I figured I had no controls or objects to clash with this name. I republished and BINGO! no longer do I have the error - all fixed. It seems though you are best to use the class name within your codebehind page (.cs) file and also change the inherits attribute in the aspx page (HTML View) to match.
The Web Platform and Tools Team at Microsoft have placed feedback of the following (using the URL above):
If you have used a Page that effectively uses a codebehind classname that is the same as say the Login control, that is Login, e.g. your page was called Login.aspx, then when you pre-compile (publish) the web site as an updateable web site, the aspx is retained and tries to compile against a type called Login in the code behind. It does not resolve to be that in the codebehind assembly
Try using a classname for your codebehind and defined in the inherits that does not clash with a type in System.Web, e.g. LoginPage, or qualify the class and therefore the inherits statement with a namespace, e.g. <%@ page ... inherits="theNs.Login" %. namespace theNs { public partial class Login : System.Web.UI.Page { .. } } Many Thanks Hope this helps you if you get this error. If you need anymore clarification then feel free to post a comment with your question. Yellow Duck Guy June 24 Create a ASP.NET Membership Security DatabaseHere I will explain how to add ASP.NET 2.0 Membership Security tables, stored procedures, views to your existing SQL Server database - its simple! Here's how:
Prerequisites:
Visual Studio 2005 installed
SQL Server 2005 installed (with a current database and your windows account with dbo/admin rights)
Note: Change (local) to your SQL database server name if it is not local. Change MyDatabaseName to your database name (suggest you create a test database first to test this on - don't do directly on production database!) DONE! Now have a look at your database. You should see a whole lot of new tables and stored procedures etc within your database. For more help on the switches on the command above, type: aspnet_regsql /? within the Visual Studio 2005 Command Prompt. Yellow Duck Guy |
|
|