Which version of FWTools do I need??

Topics: SharpMap v0.9 / v1.x
Jul 14, 2010 at 2:29 PM
Edited Jul 14, 2010 at 2:32 PM
Edit: First off, apologies... I can’t figure out why, but my post is all being shown on one line, despite me writing it out nicely :s Hi, I’m getting the following error when trying to load a TIFF layer: ---- Server Error in '/' Application. Unable to load DLL 'gdal_wrap': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 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.DllNotFoundException: Unable to load DLL 'gdal_wrap': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 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: [DllNotFoundException: Unable to load DLL 'gdal_wrap': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)] OSGeo.GDAL.GdalPINVOKE.AllRegister() +0 OSGeo.GDAL.Gdal.AllRegister() +7 SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename) +343 Bluefox.WMS.WMS.Page_Load(Object sender, EventArgs e) in d:\documents\visual studio 2010\Projects\Bluefox.WMS\ClassLibrary1\WMS.cs:23 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 ---- As it stands, I think I’ve probably got the wrong version of FWTools. I have downloaded 2.4.2, which is what the instructions at http://sharpmap.codeplex.com/wikipage?title=Configure%20GDAL%20%20OGR%20FWTools%20(as%20of%20revision%2057193)&referringTitle=How%20to... said to use, but I’m probably using a newer version of SharpMap, which was built upon a newer version of FWTools? I’m using the Oct 22nd 2009 release from the download page. So what version of FWTools do I need to download to get it to work? Thanks, Dylan
Coordinator
Jul 14, 2010 at 2:58 PM

Hello Dylan,

please get sharpmap sources from the sources tab or vie (tortoise)svn and compile the library yourself.

If you do that, you need FWTools 2.4.7 to get Gdal/Ogr working.

Hth FObermaier

 

Jul 14, 2010 at 2:59 PM
Thanks, I’ll give it a go and report back.
Jul 14, 2010 at 3:04 PM
Hmm, can’t get it to compile. I’m getting the following errors: ------ Build started: Project: SharpMap, Configuration: Release Any CPU ------ D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\LayerGroup.cs(33,38): error CS0246: The type or namespace name 'ICanQueryLayer' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\VectorLayer.cs(55,39): error CS0246: The type or namespace name 'ICanQueryLayer' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Web\Wms\Client.cs(115,25): error CS0246: The type or namespace name 'SpatialReferencedBoundingBox' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\WmsLayer.cs(579,22): error CS0246: The type or namespace name 'SpatialReferencedBoundingBox' could not be found (are you missing a using directive or an assembly reference?) Compile complete -- 4 errors, 0 warnings ------ Build started: Project: SharpMap.Extensions, Configuration: Release Any CPU ------ error CS0006: Metadata file 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' could not be found Compile complete -- 1 errors, 0 warnings C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "gdalconst_csharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "mapscript_csharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. ------ Build started: Project: SharpMap.UI, Configuration: Release Any CPU ------ error CS0006: Metadata file 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' could not be found Compile complete -- 1 errors, 0 warnings ------ Build started: Project: UnitTests, Configuration: Release Any CPU ------ C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(160,9): error MSB3104: The referenced assembly "D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(160,9): error MSB3104: The referenced assembly "D:\Documents\Visual Studio 2010\SharpMap\SharpMap.Extensions\bin\Release\SharpMap.Extensions.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one. ------ Build started: Project: WinFormSamples.2005, Configuration: Release Any CPU ------ ResGen : error RG0000: Could not load referenced assembly "D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll". Caught a FileNotFoundException saying "Could not load file or assembly 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' or one of its dependencies. The system cannot find the file specified.". ------ Build started: Project: D:\...\DemoWebSite\, Configuration: Debug Any CPU ------ Validating Web Site D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(8,16): error CS0234: The type or namespace name 'Data' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(9,16): error CS0234: The type or namespace name 'Layers' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(10,16): error CS0234: The type or namespace name 'Rendering' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(11,16): error CS0234: The type or namespace name 'Rendering' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(12,16): error CS0234: The type or namespace name 'Styles' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(13,27): error CS0234: The type or namespace name 'Rendering' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(14,22): error CS0234: The type or namespace name 'Geometries' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(21,19): error CS0246: The type or namespace name 'Map' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(112,19): error CS0246: The type or namespace name 'Map' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(157,19): error CS0246: The type or namespace name 'WmsLayer' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(171,19): error CS0246: The type or namespace name 'Map' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(220,19): error CS0246: The type or namespace name 'Map' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(326,19): error CS0246: The type or namespace name 'Map' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\DemoWebSite\App_Code\MapHelper.cs(422,28): error CS0234: The type or namespace name 'Map' does not exist in the namespace 'SharpMap' (are you missing an assembly reference?) Validation Complete ------ Build started: Project: DemoWinForm, Configuration: Release Any CPU ------ ResGen : error RG0000: Could not load referenced assembly "D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll". Caught a FileNotFoundException saying "Could not load file or assembly 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' or one of its dependencies. The system cannot find the file specified.". ========== Build: 0 succeeded or up-to-date, 7 failed, 0 skipped ==========
Jul 14, 2010 at 3:05 PM
Also, any idea why everything I post gets formatted to one line? :S
Coordinator
Jul 14, 2010 at 4:06 PM
dylanparry wrote:
Also, any idea why everything I post gets formatted to one line? :S

I get that every once in a while, don't know why. Maybe using the Microsoft domestic Internet Explorer helps.

How did you pull the source? I just got commited a minor bugfix regarding project files referencing files only present on my machine. After that everything built fine.

hth FObermaier

 

Jul 14, 2010 at 4:09 PM
Using IE for this attempt :) I downloaded it via the “source code” tab and clicked on the “download” link under “latest version”. I’ll download it again in a bit and see if that helps. Thanks.
Jul 14, 2010 at 4:31 PM

Still getting the same, or at least similar errors. After deleting the demo projects, and the unit tests, the following errors are remaining

  1. Error 1 The type or namespace name 'ICanQueryLayer' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\LayerGroup.cs 33 38 SharpMap
  2. Error 2 The type or namespace name 'ICanQueryLayer' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\VectorLayer.cs 55 39 SharpMap
  3. Error 3 The type or namespace name 'SpatialReferencedBoundingBox' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Web\Wms\Client.cs 115 25 SharpMap
  4. Error 4 The type or namespace name 'SpatialReferencedBoundingBox' could not be found (are you missing a using directive or an assembly reference?) D:\Documents\Visual Studio 2010\SharpMap\SharpMap\Layers\WmsLayer.cs 579 22 SharpMap
  5. Error 5 Metadata file 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' could not be found SharpMap.UI
  6. Error 6 Metadata file 'D:\Documents\Visual Studio 2010\SharpMap\SharpMap\bin\Release\SharpMap.dll' could not be found SharpMap.Extensions

Could I be missing something that I need to install, or is there something I need to do in VS to be able to compile it? I’m using VS2010 if that helps.

Jul 14, 2010 at 4:47 PM

Hmm, I fired up VS2008 instead and that compiled it just fine! I’ll see whether it all works now though and solves my original problem.

Jul 14, 2010 at 5:05 PM

Well, the original error is gone now, so something seems to have worked. However I’m getting a different error now with regards to the raster layer I’m testing it with:

Server Error in '/' Application.

Couldn't load S:\data\opendata\250k\HT.tif

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

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.Exception: Couldn't load S:\data\opendata\250k\HT.tif

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

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: 

[Exception: Couldn't load S:\data\opendata\250k\HT.tif

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
   SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename) +972
   Bluefox.WMS.WMS.Page_Load(Object sender, EventArgs e) +138
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

It’s an odd error to me as the file opens just fine in other software, so I’m totally at a loss as to why it won’t open in SharpMap. I’ve also tried other raster files and am getting the same errors with them. They are all TIF files with associated TFW files. I’ve checked the permissions on the TIF files, and even temporarily set them to allow “Everyone” access, but that’s made no difference either. I’ve never seen an error like this one before…

 

Coordinator
Jul 14, 2010 at 9:32 PM

It seems to me as if you have some mixed versions. Are you sure you have set your web.config files according to the howto? Maybe you need Gdal for some other project and have the environment variables already set to some other place?

Hth Fobermaier

Jul 15, 2010 at 8:38 AM
Edited Jul 15, 2010 at 8:56 AM

That could be it. We already had 1.0.5 installed on the server as we were using it on an older project, and I believe that the PATH includes the /bin directory for this version. Could that be what’s causing it?

Edit: I’ve just uninstalled the older version of FWTools, and changed the PATH to point to the 2.4.7, but that’s made no difference and I’m still getting the same error. Having looked at older threads with the same error, I’m going to see if forcing it to compile for x86 makes any difference.

Jul 15, 2010 at 9:45 AM

Not sure if this will help, but here’s the output from the event log:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 15/07/2010 10:43:01
Event time (UTC): 15/07/2010 09:43:01
Event ID: e560b07140e0459a9ccb756b548190e6
Event sequence: 9
Event occurrence: 2
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1598913192/Root-2-129236593525018444
    Trust level: Full
    Application Virtual Path: /
    Application Path: W:\websites\wms.devplan.org.uk\www\
    Machine name: VENUS
 
Process information:
    Process ID: 3044
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: Exception
    Exception message: Couldn't load S:\data\opendata\miniscale\MiniScale_(no_grid)_R12.tif

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename)
   at Bluefox.WMS.WMS.Page_Load(Object sender, EventArgs e)
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 
 
Request information:
    Request URL: http://wms.devplan.org.uk/wms.aspx??SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
    Request path: /wms.aspx
    User host address: 94.3.0.77
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 11
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename)
   at Bluefox.WMS.WMS.Page_Load(Object sender, EventArgs e)
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Coordinator
Jul 15, 2010 at 10:17 AM
Edited Jul 15, 2010 at 10:17 AM

could you post output from

set > set.out

(from the command line)

along with fwtools related content of web.config file?

FObermaier

Jul 15, 2010 at 10:20 AM

Sure. Here’s the set.out contents:


ALLUSERSPROFILE=C:\Documents and Settings\All Users

APPDATA=C:\Documents and Settings\Dylan\Application Data

CLIENTNAME=DYLAN-DESKTOP

ClusterLog=C:\WINDOWS\Cluster\cluster.log

CommonProgramFiles=C:\Program Files\Common Files

COMPUTERNAME=VENUS

ComSpec=C:\WINDOWS\system32\cmd.exe

FP_NO_HOST_CHECK=NO

HOMEDRIVE=C:

HOMEPATH=\Documents and Settings\Dylan

lib=C:\Program Files\SQLXML 4.0\bin\

LOGONSERVER=\\VENUS

NUMBER_OF_PROCESSORS=4

OS=Windows_NT

Path=C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Intel\DMIX;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\FWTools2.4.7\bin;C:\MsSqlSpatial;C:\program files\linkd;C:\WINDOWS\system32\WindowsPowerShell\v1.0

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0f06

ProgramFiles=C:\Program Files

PROMPT=$P$G

PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\

SESSIONNAME=RDP-Tcp#15

SystemDrive=C:

SystemRoot=C:\WINDOWS

TEMP=C:\DOCUME~1\Dylan\LOCALS~1\Temp\1

TMP=C:\DOCUME~1\Dylan\LOCALS~1\Temp\1

USERDOMAIN=VENUS

USERNAME=Dylan

USERPROFILE=C:\Documents and Settings\Dylan

windir=C:\WINDOWS


And here’s the contents of the web.config file:

<appSettings>
    <add key="FWToolsBinPath" value="C:\Program Files\FWTools2.4.7\bin"/>
</appSettings>

Coordinator
Jul 15, 2010 at 10:41 AM
Edited Jul 15, 2010 at 10:47 AM

could you try to either remove fwtools2.4.7 path from path or move it to the first place?

you might have to restart the machine for that to take effect

FObermaier

Jul 15, 2010 at 11:01 AM

Doesn’t seem to change anything, but breaks other stuff on the server that relies on it being in the path. Moving it made no difference either.

As a test, I decided to load up the TIF/TIFW files into another product we have access to—Image Web Server. Strangely this failed to load the TIF files too. I then tried opening them in MapInfo, but they opened fine there, so not sure what the problem is. In IWS it couldn’t pick up any of the coordinate info for the TIF files, which made me think that there was something wrong with the TIFW files, but that can’t be right as the files came straight from the Ordnance Survey! I’m really puzzled now. I’m going to see if FWTools can translate some of the files to ECW and see if they’ll load.

Coordinator
Jul 15, 2010 at 12:59 PM

Last guess, you have some native gdal libraries in your Bin folder that break up your configuration.

If you have added the fwtools path to the path variable you mustn't add the native binaries to the bin folder, even if the error message recomends that.

You could also test your dependencies for gdal with www.dependencywalker.com

Hth FObermaier

Jul 15, 2010 at 1:26 PM

The DLL files that I have in the /bin directory are:

  1. Bluefox.WMS.dll
  2. BruTile.dll
  3. gdal_csharp.dll
  4. ProjNet.dll
  5. SharpMap.dll
  6. SharpMap.Extensions.dll

Are there any there that shouldn’t be, or are there any obvious ones missing?

Jul 15, 2010 at 1:38 PM

I’ve fixed it! Unbelievably, the problem was caused by tring to use SharpMap within a .Net 4.0 project. I’ve changed the target version to 2.0, recompiled and it now works exactly as expected. Thanks for all the help :)

Developer
Jul 21, 2010 at 10:45 AM

Hi dylanparry

Im having the same error message as you do have in your post Jul 14 at 7:05 PM. 

Event Type:       Warning

Event Source:    ASP.NET 2.0.50727.0

Event Category: Web Event 

Event ID:           1309

Date:                6/28/2010

Time:                3:50:02 PM

User:                N/A

Computer:         WEB

Description:

Event code: 3005 

Event message: An unhandled exception has occurred. 

Event time: 6/28/2010 3:50:02 PM 

Event time (UTC): 6/28/2010 1:50:02 PM 

Event ID: 4f1a060317c44df7af9fa19a9d973c37 

Event sequence: 330 

Event occurrence: 1 

Event detail code: 0 

 

Application information: 

    Application domain: /LM/W3SVC/808835097/Root/Watersense-1-129222065805561510 

    Trust level: Full 

    Application Virtual Path: /Watersense 

    Application Path: D:\Inetpub\HydroLogic OLD\Htdocs\Gadgets\WaterSense\ 

    Machine name: WEB 

 

Process information: 

    Process ID: 836 

    Process name: w3wp.exe 

    Account name: NT AUTHORITY\NETWORK SERVICE 

 

Exception information: 

    Exception type: Exception 

    Exception message: Couldn't load D:\Inetpub\HydroLogic OLD\Htdocs\Gadgets\WaterSense\App_Data\maps\2010-7-27\hgw\25\ruw\Hgw_25_ruw.map

 

Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 

 

Request information: 

    Request URL: http://gadgets.lenvis.eu/watersense/getmap.ashx?LAYERS=PeilgebiedenRasterTransparantAn unhandled exception has occurred.C2010-7-27-hsw-25-ruwAn unhandled exception has occurred.Cpeilgebieden&VERSION=1.3.0&CRS=EPSG6/28/2010 3:50:02 PMA28992&TRANSPARENT=true&FORMAT=imageAn unhandled exception has occurred.Fpng&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=applicationAn unhandled exception has occurred.Fvnd.ogc.se_inimage&BBOX=262466.52493474,542710.98004718,263172.0801093,543416.53522174&WIDTH=256&HEIGHT=256 

    Request path: /watersense/getmap.ashx 

    User host address: 82.95.1.133 

    User:  

    Is authenticated: False 

    Authentication Type:  

    Thread account name: NT AUTHORITY\NETWORK SERVICE 

 

Thread information: 

    Thread ID: 1 

    Thread account name: NT AUTHORITY\NETWORK SERVICE 

    Is impersonating: False 

    Stack trace:    at SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename) in D:\Software\WaterSenseGadgetsWMS\SharpMap\Trunk\SharpMap.Extensions\Layers\GdalRasterLayer.cs:line 426

   at WaterSenseGadgetsWMS.GetMap.ProcessRequest(HttpContext context) in D:\Software\WaterSenseGadgetsWMS\GetMap.ashx.cs:line 147

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

 

Custom event details: 

 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

 

Since I use it in a WMS and have OpenLayers as a client, it sometimes results in one of the tiles not being loaded. So it's not a major problem, but it is annoying.
In your last post, you wrote that changing to version 2.0 solved the problem for you and I would do the same if I did not use System.Linq so often in my code, which should be rewritten if I change to 2.0

So here's my question: can you simulate a huge amount of requests on your WMS and check whether this error will occur for once in a while? These error's can be found in the Event Viewer of your windows...


hth,

PeaceNlove

 


Jul 21, 2010 at 11:13 AM

I imagine that if I’d changed it to target 3.5 it’d be just fine for me too as 3.5 uses the 2.0 runtime anyway. The WMS I’m working on seems to work okay so far, although I won’t be able to test it on a high load for a little while yet as someone else in our team is developing that bit :(

As you’re using OpenLayers though, there’s a possible solution by running your WMS on a few subdomains (where they are really aliases of each other) and telling OpenLayers to use multiple servers. You can also, I believe, set OpenLayers to try a few times when a tile fails to load… not sure how that’s done though.

Of course, that doesn’t really fix anything, but at least you’d minimise the errors seen on the public-facing side.

Developer
Jul 21, 2010 at 2:17 PM
thanks for your reply and pointing me towards the OL solution for retrying. More information on retrying when loading fails can be found here: http://dev.openlayers.org/docs/files/OpenLayers/Util-js.html

Currently, I've set the IIS setting that does take my Application pool down when more than 5 errors like these occur within 5 minutes off (which fixes further problems stemming from this error) 
Now I hope the pink tiles disappear when this retrying thing works. Together it will do :-)