D
danielle.m.manning
I have a question about a problem I am having with attempting to port
some old ASP code to ASP.NET.
We have a dll out there which we downloaded which creates GUIDs for
session management. In ASP, the function looks like this:
Function getGuid()
Dim sessionDUID
Dim MyGuid = Server.CreateObject("GuidMakr.GUID")
Dim mySession = Replace(MyGuid.GetGUID, "{", "")
MyGuid = Nothing
mySession = Replace(mySession, "}", "")
getGUID = mySession
End Function
Kind of hokey, but it was written by someone else, and for my purposes
it works just fine. However, I want to use the same functionality in
an ASP.NET framework. I have this exact same function in a class, but
I have modified it a little:
Function getGuid()
Dim sessionDUID
Dim MyGuid As New Object
MyGuid = Server.CreateObject("GuidMakr.GUID")
Dim mySession = Replace(MyGuid.GetGUID, "{", "")
MyGuid = Nothing
mySession = Replace(mySession, "}", "")
getGUID = mySession
End Function
and it blows up on this line:
MyGuid = Server.CreateObject("GuidMakr.GUID")
with this error:
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Can someone give me some guidance? I'd appreciate it, thank you.
Danielle
However,
some old ASP code to ASP.NET.
We have a dll out there which we downloaded which creates GUIDs for
session management. In ASP, the function looks like this:
Function getGuid()
Dim sessionDUID
Dim MyGuid = Server.CreateObject("GuidMakr.GUID")
Dim mySession = Replace(MyGuid.GetGUID, "{", "")
MyGuid = Nothing
mySession = Replace(mySession, "}", "")
getGUID = mySession
End Function
Kind of hokey, but it was written by someone else, and for my purposes
it works just fine. However, I want to use the same functionality in
an ASP.NET framework. I have this exact same function in a class, but
I have modified it a little:
Function getGuid()
Dim sessionDUID
Dim MyGuid As New Object
MyGuid = Server.CreateObject("GuidMakr.GUID")
Dim mySession = Replace(MyGuid.GetGUID, "{", "")
MyGuid = Nothing
mySession = Replace(mySession, "}", "")
getGUID = mySession
End Function
and it blows up on this line:
MyGuid = Server.CreateObject("GuidMakr.GUID")
with this error:
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Can someone give me some guidance? I'd appreciate it, thank you.
Danielle
However,