Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Problem getting the source-version to run
marcd
#1 Posted : Saturday, 14 November 2009 12:10:05 AM(UTC)
marcd

Rank: Advanced Member

Joined: 13/02/2009(UTC)
Posts: 53
Location: Zurich, Switzerland

Hi Roger,

As state some months ago I try to enhance the GSP a little. First shot is to add a "latest n pictures" box on the main page of GSP. I already added a first draft of the functions to the provider interface, the base class and a SQLite implementation (SQLServer impl. currently returns null).

Now I i tried to get the source-version of the GSP to run from within VS2008 using the Casini webserver. I renamed the x64 binary for SQLlite as I am using 32-bit. Then I've successfully executed the installer from within the VS2008/Casini.

But now I get the error-page (showErrorDetails set to true) that shows me the following error. Maybe you are already aware what could be the problem and give me a hint or two ;-)

Cheers,
Marc

Code:

Error Summary

Url
http://localhost:55934/default.aspx?g=admin_general

Timestamp
14.11.2009 15:06:20

Exception Type
System.NullReferenceException

Message
Object reference not set to an instance of an object.

Source
GalleryServerPro.Business

Target Site
Boolean DetermineIfDotNet3IsInstalled()

Stack Trace
at GalleryServerPro.Business.AppSetting.DetermineIfDotNet3IsInstalled() in D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\GalleryServerPro_V2_3_3512_LatestNMediaObjects\TIS.GSP.Business\AppSetting.cs:line 566
at GalleryServerPro.Business.AppSetting.Initialize(ApplicationTrustLevel trustLevel, String physicalAppPath, String appName) in D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\GalleryServerPro_V2_3_3512_LatestNMediaObjects\TIS.GSP.Business\AppSetting.cs:line 448
at GalleryServerPro.Web.Util.InitializeBusinessLayer() in D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\GalleryServerPro_V2_3_3512_LatestNMediaObjects\Website\CodeFiles\Util.cs:line 1298
at GalleryServerPro.Web.Util.InitializeApplication() in D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\GalleryServerPro_V2_3_3512_LatestNMediaObjects\Website\CodeFiles\Util.cs:line 1190

App Error ID
-2147483648

Gallery ID
1

HTTP User Agent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)


Form Variables

<none>


Cookies

.ASPXANONYMOUS
W7ONwsObygEkAAAAZjg0NjI4ZDQtNGE2Mi00ZDJmLWFlMDUtYjY5MjZlYTUwZjY1W3qSqWkP oY6wob4XWZ2GKVTlfIc1

ASP.NET_SessionId
m1lhmj45wph00kiahy4j0jed


Session Variables

1
1


Server Variables

ALL_HTTP
HTTP_CONNECTION:Keep-Alive
HTTP_ACCEPT:*/*
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:de-CH
HTTP_COOKIE:.ASPXANONYMOUS=W7ONwsObygEkAAAAZjg0NjI4ZDQtNGE2Mi00ZDJmLWFlM DUtYjY5MjZlYTUwZjY1W3qSqWkPoY6wob4XWZ2GKVTlfIc1; ASP.NET_SessionId=m1lhmj45wph00kiahy4j0jed
HTTP_HOST:localhost:55934
HTTP_REFERER:http://localhost:55934/
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)


ALL_RAW
Connection: Keep-Alive
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: de-CH
Cookie: .ASPXANONYMOUS=W7ONwsObygEkAAAAZjg0NjI4ZDQtNGE2Mi00ZDJmLWFlMDUtYjY5MjZlY TUwZjY1W3qSqWkPoY6wob4XWZ2GKVTlfIc1; ASP.NET_SessionId=m1lhmj45wph00kiahy4j0jed
Host: localhost:55934
Referer: http://localhost:55934/
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)


APPL_MD_PATH


APPL_PHYSICAL_PATH
D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\ GalleryServerPro_V2_3_3512_LatestNMediaObjects\Website\

AUTH_TYPE


AUTH_USER


AUTH_PASSWORD


LOGON_USER
aqua\marc

REMOTE_USER


CERT_COOKIE


CERT_FLAGS


CERT_ISSUER


CERT_KEYSIZE


CERT_SECRETKEYSIZE


CERT_SERIALNUMBER


CERT_SERVER_ISSUER


CERT_SERVER_SUBJECT


CERT_SUBJECT


CONTENT_LENGTH
0

CONTENT_TYPE


GATEWAY_INTERFACE


HTTPS


HTTPS_KEYSIZE


HTTPS_SECRETKEYSIZE


HTTPS_SERVER_ISSUER


HTTPS_SERVER_SUBJECT


INSTANCE_ID


INSTANCE_META_PATH


LOCAL_ADDR
127.0.0.1

PATH_INFO
/default.aspx

PATH_TRANSLATED
D:\development\idev_development\DotNet\Projects\GalleryServerPro\vendor\ GalleryServerPro_V2_3_3512_LatestNMediaObjects\Website\default.aspx

QUERY_STRING
g=admin_general

REMOTE_ADDR
127.0.0.1

REMOTE_HOST
127.0.0.1

REMOTE_PORT


REQUEST_METHOD
GET

SCRIPT_NAME
/default.aspx

SERVER_NAME
localhost

SERVER_PORT
55934

SERVER_PORT_SECURE
0

SERVER_PROTOCOL
HTTP/1.1

SERVER_SOFTWARE


URL
/default.aspx

HTTP_CONNECTION
Keep-Alive

HTTP_ACCEPT
*/*

HTTP_ACCEPT_ENCODING
gzip, deflate

HTTP_ACCEPT_LANGUAGE
de-CH

HTTP_COOKIE
.ASPXANONYMOUS=W7ONwsObygEkAAAAZjg0NjI4ZDQtNGE2Mi00ZDJmLWFlMDUtYjY5MjZlY TUwZjY1W3qSqWkPoY6wob4XWZ2GKVTlfIc1; ASP.NET_SessionId=m1lhmj45wph00kiahy4j0jed

HTTP_HOST
localhost:55934

HTTP_REFERER
http://localhost:55934/

HTTP_USER_AGENT
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
marcd
#2 Posted : Saturday, 14 November 2009 12:16:13 AM(UTC)
marcd

Rank: Advanced Member

Joined: 13/02/2009(UTC)
Posts: 53
Location: Zurich, Switzerland

Just recognized that the AppSettings.cs is not a generated code file but your own. Debugging the function DetermineIfDotNet3IsInstalled() show that the following line return NULL.

Code:

Type metadataExtractor = assembly.GetType("GalleryServerPro.Business.Wpf.WpfMetadataExtractor");


so the following line will crash with the above error:

Code:

System.Reflection.MethodInfo addMetadataMethod = metadataExtractor.GetMethod("AddWpfBitmapMetadata", parmTypes);


any ideas?
marcd
#3 Posted : Saturday, 14 November 2009 12:24:48 AM(UTC)
marcd

Rank: Advanced Member

Joined: 13/02/2009(UTC)
Posts: 53
Location: Zurich, Switzerland

Just added the following lines between the two shown above:

Code:

if (metadataExtractor == null)
{
return false;
}


Now the gallery runs. But there seems to be a problem loading the assembly GalleryServerPro.Business.Wpf.WpfMetadataExtractor. I am running VS2008 on Win7 Pro with the latest service packs so WPF should be no problem I think. I also use the .net 3.5 web.config. Hmm... Strange.
Roger Martin
#4 Posted : Saturday, 14 November 2009 6:09:13 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Any chance you changed the namespace so that GalleryServerPro.Business.Wpf.WpfMetadataExtractor no longer exists?

The other reason for the failure is that the dll named GalleryServerPro.Business.Wpf.dll is not present in your bin directory.

At any rate, if you are sure you will run the code under .NET 3.5 or later, you can modify that code so that it uses a direct project reference to the TIS.GSP.Business.WPF project instead of reflection. I use reflection so that it degrades gracefully in .NET 2.0.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
marcd
#5 Posted : Saturday, 14 November 2009 5:35:57 PM(UTC)
marcd

Rank: Advanced Member

Joined: 13/02/2009(UTC)
Posts: 53
Location: Zurich, Switzerland

I did not change any namespace yet. Also I like to keep my changes as little as possible to be able to integrate the new features into the standard GSP project (if you like them). So no 3.5 features to use ;-)
Roger Martin
#6 Posted : Sunday, 15 November 2009 6:28:34 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Have you checked your bin directory to make sure that GalleryServerPro.Business.Wpf.dll is present?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
marcd
#7 Posted : Thursday, 19 November 2009 5:32:00 AM(UTC)
marcd

Rank: Advanced Member

Joined: 13/02/2009(UTC)
Posts: 53
Location: Zurich, Switzerland

Yep, its there.
Roger Martin
#8 Posted : Thursday, 19 November 2009 9:45:24 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Well, I am not sure. The only possible causes I can think of are:

1. The dll is not present in the bin directory.
2. The name of the dll has changed.
3. The namespace/type has changed.

As I said before, if you want to get it running, you can always do a direct project reference instead of using reflection.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.