sridhar_msd

Hi

I have a tool with registered license. when i import the tool dll and worked with its method in a window application it was working fine without any problem.

But when i tried the same dll method on web application its not working giving the error as "Object Reference not set to instance of an object".

Please help me on this

Its urgent

Thanks in advance

Sridhar Manoharan




Re: Visual C# General dll methods when imported working in window application and not working in web application

TilakGopi

Hi,

Have u traced out where the error occurs (i mean which line of code)

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C# General dll methods when imported working in window application and not working in web application

sridhar_msd

Yes it has a method .execute() the errors occurs over there

Thanks

Sridhar Manoharan






Re: Visual C# General dll methods when imported working in window application and not working in web application

TilakGopi

Hi,

As far as i under stood , there is some object(may be of any type) and this someobject.execute() method giving error.

If it is possible to debug, check the value of that some object,if not ,put a condition like



if(someobject != null)
{
  someobject.Execute();//will not cause error but may not do the job correctly.
}

 

If someobject is becoming null, then trace back ,why it is becoming null Posting code(if possible) may solve the problem quickly.

Thanx,

Ch.T.Gopi Kumar.

 






Re: Visual C# General dll methods when imported working in window application and not working in web application

sridhar_msd

here is my code

Dim delt1

delt1 = CreateObject("Delta.Executor.1")

delt1.Map = "Event4_Map-LLS.dtm"

Dim result = delt1.ExecuteMap() ---- here the error occurs as

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 30:     delt1 = CreateObject("Delta.Executor.1")
Line 31:     delt1.Map = "Event4_Map-LLS.dtm"
Line 32:     Dim result = delt1.ExecuteMap()
Line 33:   End Sub
Line 34: End Class

Source File: c:\inetpub\wwwroot\WebApplication8\WebForm1.aspx.vb Line: 32






Re: Visual C# General dll methods when imported working in window application and not working in web application

TilakGopi

Hi sridhar,

So ,it seems it's not the problem with delt1 (certainly it's not null),since the delt1.Map = "Event4_Map-LLS.dtm" statement is not giving u any error.If u admit the code upto here is valid(like delt1 is not null),then it should be the method ExceuteMap() definitely,creating the problem.Is it a standard method or implemented by ur team

I think this Delta.Executor.1 is ur own customized ActiveX contol.So review(if possible debug) the implementation of ExecuteMap,definitely ,some where ,some object is being used with out initialized properly.That could be the reason,i'm sure.

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C# General dll methods when imported working in window application and not working in web application

sridhar_msd

Thanks gopi

But it was working in window application how come it was possible that one method esposed working in window and not in web application.

Thanks

Sridhar Manoharan






Re: Visual C# General dll methods when imported working in window application and not working in web application

TilakGopi

I'm still child in this knowledge'full' world,I can't the perfect answer for this question.

But i can guess , there will be definitely security related or authorization relates issues differed between a windows application and a web application.So there are chances for a code snippet that can work on windows application and can fail on web application.

Thanx,

Ch.T.Gopi Kumar.