Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Saturday, March 31, 2012

Strange "Object reference not set to an instance of an object" error in webform

I suddenly received an unexpected error in my project. I have been working
on this project for some time without this issue. Nothing has changed in the
form that caused the exception. A little experimentation shows that I cannot
run ANY .NET web project without getting this error:

-----------------------
--

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:

Line 1: <%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb" Inherits="DataBayWeb.Login" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML
Source File: c:\inetpub\wwwroot\DataBayWeb\login.aspx Line: 1

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.Control.get_Controls()
System.Web.UI.Control.AddParsedSubObject(Object obj)

System.Web.UI.Control.System.Web.UI.IParserAccesso r.AddParsedSubObject(Objec
t obj)
ASP.Login_aspx.__BuildControlTree(Control __ctrl) in
c:\inetpub\wwwroot\DataBayWeb\login.aspx:1
ASP.Login_aspx.FrameworkInitialize()
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionSte
p.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)

Other developers on my team can run the latest version of the project
without an issue. What has happened?

ChrisVery strange indeed. It might sound obscure, but try removing the
space in <%@. Page...

Otherwise, I would be tempted to do the inevitable and reinstall the
framework.

Simon.

Strange "Object reference not set to an instance of an object" error in web

I suddenly received an unexpected error in my project. I have been working
on this project for some time without this issue. Nothing has changed in the
form that caused the exception. A little experimentation shows that I cannot
run ANY .NET web project without getting this error:
----
--
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:
Line 1: <%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb" Inherits="DataBayWeb.Login" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML>
Source File: c:\inetpub\wwwroot\DataBayWeb\login.aspx Line: 1
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.Control.get_Controls()
System.Web.UI.Control.AddParsedSubObject(Object obj)
System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(Objec
t obj)
ASP.Login_aspx.__BuildControlTree(Control __ctrl) in
c:\inetpub\wwwroot\DataBayWeb\login.aspx:1
ASP.Login_aspx.FrameworkInitialize()
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte
p.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Other developers on my team can run the latest version of the project
without an issue. What has happened?
ChrisVery strange indeed. It might sound obscure, but try removing the
space in <%@. Page...
Otherwise, I would be tempted to do the inevitable and reinstall the
framework.
Simon.

Wednesday, March 28, 2012

strange but true

Hi all,

I have been working on an Asp .Net project that reports from a database.
The project was going great, until all of a sudden the results stopped
displaying!. I do not know if it is a buffering problem, the thing is that
I did not get any warning at compilation time, and when trying to display
output from within VS I did not see the labels with the values coming out
of the database. I was able to get evrything perfect until I added a new
datagrid to display a new result set. I then tried to comment out the
code that operates on that result set, but I still get no output.

Can anybody help?

Thanks,

Carlos.And if you take a look at the HTML source? Could be that you might have
added additional code and forgot to add the closing tag or forgot the end
quote of an attribute value or something.

Gabriel Lozano-Morn

"Carlos" <ch_sanin@.yahoo.com> wrote in message
news:OkOAkZaSFHA.3788@.tk2msftngp13.phx.gbl...
> Hi all,
> I have been working on an Asp .Net project that reports from a database.
> The project was going great, until all of a sudden the results stopped
> displaying!. I do not know if it is a buffering problem, the thing is that
> I did not get any warning at compilation time, and when trying to display
> output from within VS I did not see the labels with the values coming out
> of the database. I was able to get evrything perfect until I added a new
> datagrid to display a new result set. I then tried to comment out the
> code that operates on that result set, but I still get no output.
> Can anybody help?
> Thanks,
> Carlos.
Thank you Gabriel for your answer,

I noticed that I placed some initialization code inside the
initializeComponent() function, that got wiped out when I updated
the page while working in the designer pane (i.e. even the event handler
got removed..) is it not recommended to place code inside this function?

Please let me know if this function is something that I should not be
messing with... Thanks again,

Carlos.

"Gabriel Lozano-Morn" <gabriel.lozano@.no-spam.com> wrote in message
news:ODWYbraSFHA.3988@.tk2msftngp13.phx.gbl...
> And if you take a look at the HTML source? Could be that you might have
> added additional code and forgot to add the closing tag or forgot the end
> quote of an attribute value or something.
> Gabriel Lozano-Morn
> "Carlos" <ch_sanin@.yahoo.com> wrote in message
> news:OkOAkZaSFHA.3788@.tk2msftngp13.phx.gbl...
> > Hi all,
> > I have been working on an Asp .Net project that reports from a database.
> > The project was going great, until all of a sudden the results stopped
> > displaying!. I do not know if it is a buffering problem, the thing is
that
> > I did not get any warning at compilation time, and when trying to
display
> > output from within VS I did not see the labels with the values coming
out
> > of the database. I was able to get evrything perfect until I added a new
> > datagrid to display a new result set. I then tried to comment out the
> > code that operates on that result set, but I still get no output.
> > Can anybody help?
> > Thanks,
> > Carlos.

strange but true

Hi all,
I have been working on an Asp .Net project that reports from a database.
The project was going great, until all of a sudden the results stopped
displaying!. I do not know if it is a buffering problem, the thing is that
I did not get any warning at compilation time, and when trying to display
output from within VS I did not see the labels with the values coming out
of the database. I was able to get evrything perfect until I added a new
datagrid to display a new result set. I then tried to comment out the
code that operates on that result set, but I still get no output.
Can anybody help?
Thanks,
Carlos.And if you take a look at the HTML source? Could be that you might have
added additional code and forgot to add the closing tag or forgot the end
quote of an attribute value or something.
Gabriel Lozano-Morn
"Carlos" <ch_sanin@.yahoo.com> wrote in message
news:OkOAkZaSFHA.3788@.tk2msftngp13.phx.gbl...
> Hi all,
> I have been working on an Asp .Net project that reports from a database.
> The project was going great, until all of a sudden the results stopped
> displaying!. I do not know if it is a buffering problem, the thing is that
> I did not get any warning at compilation time, and when trying to display
> output from within VS I did not see the labels with the values coming out
> of the database. I was able to get evrything perfect until I added a new
> datagrid to display a new result set. I then tried to comment out the
> code that operates on that result set, but I still get no output.
> Can anybody help?
> Thanks,
> Carlos.
>
Thank you Gabriel for your answer,
I noticed that I placed some initialization code inside the
initializeComponent() function, that got wiped out when I updated
the page while working in the designer pane (i.e. even the event handler
got removed..) is it not recommended to place code inside this function?
Please let me know if this function is something that I should not be
messing with... Thanks again,
Carlos.
"Gabriel Lozano-Morn" <gabriel.lozano@.no-spam.com> wrote in message
news:ODWYbraSFHA.3988@.tk2msftngp13.phx.gbl...
> And if you take a look at the HTML source? Could be that you might have
> added additional code and forgot to add the closing tag or forgot the end
> quote of an attribute value or something.
> Gabriel Lozano-Morn
> "Carlos" <ch_sanin@.yahoo.com> wrote in message
> news:OkOAkZaSFHA.3788@.tk2msftngp13.phx.gbl...
that
display
out
>

Saturday, March 24, 2012

strange error during publishing

I was publishing my asp.net 2005 to my web site with up dates, but I kept getting runtime errors. with no details

so I created a new project(web page) added all the existing folders , pages(aspx and vb) then published no problem

what the heck is going on

also how do i create an error page so I can see the errors remotley?

Turn off the customErrors option in web.config of the website to check the detailed error message:

<customErrors mode="Off" />

Strange error in asp.net 1.1

I was working on a project in asp.net 1.1. I formatted my system & to save the project copied it to another drive in form of folder(which is stored in wwwroot directory). When i reinstalled windows & copied my project to wwwroot & tried running it in visual studio then following error came:

Web server is not configurd to debug the project. Please configure the web server.

Moreover when i use ' view in browser ' option then also it reports an error in web.config's authentication part.

What could be the possible reason and solution for this problem?

Make sure you have created the application as a valid application for the IIS ( virtual directory)

Thanks


Can u elaborate on that please. and what exactly i m supposed to do?

to create a virtual directory for your project

1- Right click My Computer/ select Manage.

2- Expand services and applications, expand Internet Information Services, Expand Website then Default Website.

3- right click your project folder, select properties, then click on "Create" beside the Application name

HC

Strange error, fixed my adding/removing custom error page and web.config?!

Whilst working on my ASP.NET project, I have been encountering this rather strange error.

It seems that sometimes my page will break, and to fix it, ie make it load at least, i have to upload my custom error page and web.config file to the server, or remove them if they are there!


Why is this happening? and how can i possibly fix the problem so i can concentrate on making the main project work.

thankyou in advance.

Paul

Hi Mr_pablo,

Based on my understanding, your web application runs in the server. Sometimes, there are something wrong with your application about custom error page and web.config. If I have misunderstood you, please feel free to let me know.

To better understand your issue, could you please provide more detail information about the issue. For example:

When a page broke, what is happened in the server? Does it show a custom error page or something?

Tuesday, March 13, 2012

strange prob!

Hi,

Currently i have a project running in .NET 1.1. This project actually has many folder in it, namely the Admin folder, Status folder.

In this the admin folder is included in the project while the dll of the contents of the status folder is included in the reference section.

The status folder includes a .sln and .csproj file. Please note that the status folder contents are not included in the project.

My problem is that the flow of the program is that it actually uses the .cs files of the status folder. So the thing is like even if i make changes to the contents of the .cs files in the status folder it is not reflected in the output even when i run it.

What could this be due to. Also there are files having extension .suo. What are these used for? Is it bcoz i i didnt include the status folder in the proj that the anamoly is coming.

Please help.

Thankx

1. You can ignore the .suo file. It's generated by Visual Studio. Better, you can erase it. All it matters is the .sln file

2. If you're using the dll as reference then you got a real problem. That's because that dll simply doesn't change

Solution:

a) Click right on solution (in the Solution Explorer). Choose "Add new" -> "Project" -> "Class Library". pick a folder outside your Web folder. So it won't be included in the web solution.

b) Add all the .cs files you want to use in this project.

c) Remove the reference to old .dll file

d) Click right on web solution and Choose -> Add Reference. Select Projects -> Choose the new project you've created.


Hit rebuild. Each time you build the project the dll will be copied in the bin directory of the web project. So it's as it should have been in the first place. If you need more help, give me some details about your folder structure and the name of the file. I'll do a custom example exactly for you :)

Happy programmingGeeked

Strange problem ScriptResource.axd

Hi guys, I have a very strange problem with scriptmanager here. I want to
load a js (which is embed in the project) but everytime i try to load that,
it gives me error like
Specified argument was out of the range of valid values.
Parameter name: utcDate
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.

I found some articles talking about this issue. like
(http://dotnetslackers.com/JavaScrip...the_future.aspx)

In this article it suggest that we should use WebResource.axd. But this is
really not an option for me now. Is there a way I can fix this without
change the build date to the past, and make this working?

Cheers
VictorHi Victor,

From your description, you encountered the dynamicc emited resource issue
when using the ASP.NET AJAX scriptResource.axd (instead of the built-in
ASP.NET webresource.axd), correct?

I've also inspected the web article you mentioned, and from the function
call stack, it did indicate that the AJAX runtime will use the current time
to validate the scirpt url also and if the assembly building time is a
later time, it will raise the error. I'm afraid the most proper solution
here is adjust the assembly's build date.

BTW, I suggest one thing here which you can still have a try:

ASP.NET will use the machine key to encrypt the webresource.axd url's
parameters(in querystring), and by default the machinekey is a randomly
generated one which may involve the current time. I'm not sure whether AJAX
scriptManager will also use this, but you can have a try to specify a fixed
machine key for project to see whether it helps. Here is the MSDN article
mentioned how to manually configure machine key:

#How To: Configure MachineKey in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998288.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

-------

Quote:

Originally Posted by

>From: "Victor" <victor@.noemail.noemail>
>Subject: Strange problem ScriptResource.axd
>Date: Mon, 1 Oct 2007 21:15:08 +1300


Quote:

Originally Posted by

>
>Hi guys, I have a very strange problem with scriptmanager here. I want to
>load a js (which is embed in the project) but everytime i try to load that,
>it gives me error like
>Specified argument was out of the range of valid values.
>Parameter name: utcDate
>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.
>
>I found some articles talking about this issue. like
>(http://dotnetslackers.com/JavaScrip...e_axd_and_and_a


ssemblies_built_in_the_future.aspx)

Quote:

Originally Posted by

>
>In this article it suggest that we should use WebResource.axd. But this is
>really not an option for me now. Is there a way I can fix this without
>change the build date to the past, and make this working?
>
>Cheers
>Victor
>
>
>
>
>
>