....but whenever I use any asp.net code I get this message:
Object reference not set to an instance of an object.
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.presentation.urlRewriter.UrlRewriterFormWriter.WriteAttribute(String name, String value, Boolean fEncode) +439
System.Web.UI.HtmlControls.HtmlForm.RenderAttributes(HtmlTextWriter writer) +908
System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag(HtmlTextWriter writer) +70
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +30
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +11333553
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5289
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
To try and strip out any guff to narrow the cuase of the problem I have done the following. On a non-umbraco website I have ceated a simple html default page, and a test1.aspx page that contains some very simple asp.net code. This works on the non-umbraco site, but fails when I publish to my umbraco site. Here is my default page that works on both Umbraco and the non-umbraco site:
default.aspx that works on both....
<%Response.Write(now())%>
<%Dim rootPath As String = Server.MapPath("~")%>
<%Dim physicalPath as string = System.Web.HttpContext.Current.Server.MapPath("~/") %>
ARSE
I am fairly new to this so hope it is something idiotic, such as me not understanding 'codebehind' or 'inherits' properly, or possibly not understandingthe mechanics of Umbraco. I've tried various application pools in IIS, and think that the fact that it works on my non-umbraco website suggests it is not an IIS issue?
Can any one help at all?
PS. I've been stuck at this point for weeks, so this isn't a call for help at the first hurdle!
Umbraco 6 works default with webforms. You must change the defaultRenderingEngine in umbracoSettings.config from webforms to MVC. Maybe this can solve your problem.
Installing Umbraco and working with Visual Studio 2010
Hello Umbraco community.
I'm setting up Umbraco to work locally on IIS 7, and have successfully installed Runway and happily played around with various features.
However I want to use Visual Studio to develop my website, and use the Umbraco CMS for managing and adding content.
I have followed the guidance here:
http://our.umbraco.org/wiki/codegarden-2009/open-space-minutes/working-in-visual-studio-when-developing-umbraco-solutions
....but whenever I use any asp.net code I get this message:
Object reference not set to an instance of an object.
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
To try and strip out any guff to narrow the cuase of the problem I have done the following. On a non-umbraco website I have ceated a simple html default page, and a test1.aspx page that contains some very simple asp.net code. This works on the non-umbraco site, but fails when I publish to my umbraco site. Here is my default page that works on both Umbraco and the non-umbraco site:
default.aspx that works on both....
test1.aspx that fails on Umbraco
I am fairly new to this so hope it is something idiotic, such as me not understanding 'codebehind' or 'inherits' properly, or possibly not understandingthe mechanics of Umbraco. I've tried various application pools in IIS, and think that the fact that it works on my non-umbraco website suggests it is not an IIS issue?
Can any one help at all?
PS. I've been stuck at this point for weeks, so this isn't a call for help at the first hurdle!
Thanks, Adam
Have a look at my blogpost here: http://cultiv.nl/blog/2009/6/1/easily-debug-your-custom-umbraco-user-controls-in-visual-studio/
This is still mostly how I do it, but in VS2010 now.
Thanks for the reply, I'll give your method a go at the weekend. I'm wondering if my copy commands have overwritten an umbraco dll possibly.
I am looking for setting up umbraco 6 in visual studio 2010.
Can somebody help me out with this? I am looking kind of step by step process to setup the umbraco.
I already have tried to install umbraco using nuget package and then copied the umbraco folder in local but its not working.
Please help me out with this.
Hi Raveendra,
why do you have copied the umbraco folder? After nuget install you can start the installation wizard from umbraco with F5.
You can find the step by step process to setup umbraco here:
https://our.umbraco.org/documentation/Installation/
Hope this helps?
Best,
Sören
Hi,
Thanks for reply,
My problem is, I want to use umbraco with mvc 4.0 in visual studio 2010.
Now as you suggested me I have installed umbraco using nuget but still some setting required, because I am not able to run umbraco directly.
can you send me more specific installation guid or links.
Thanks in advanced.
Hi Raveendra,
Umbraco 6 works default with webforms. You must change the defaultRenderingEngine in umbracoSettings.config from webforms to MVC. Maybe this can solve your problem.
Here is an other link:
http://www.ben-morris.com/using-umbraco-6-to-create-an-asp-net-mvc-4-web-applicatio/
Best,
Sören
now when I open this link there is nothing to doanload.
You find here all umbraco releases:
https://our.umbraco.org/download
Cheers,
Sören
is working on a reply...