Welcome Guest Search | Active Topics | Members | Log In | Register
Error - Object is currently in use elsewhere Options
lug668
Posted: Tuesday, November 04, 2008 10:27:28 PM
Rank: Member

Joined: 5/1/2008
Posts: 10
Location: Melbourne, Australia
Recently I've received heaps of errors with same type: System.InvalidOperationException. Here is the part of error message:

Name Value
Type System.InvalidOperationException
Message Object is currently in use elsewhere.
Source System.Drawing
TargetSite System.Drawing.Imaging.ImageFormat get_RawFormat()
StackTrace at System.Drawing.Image.get_RawFormat()
at System.Drawing.Graphics.IgnoreMetafileErrors(Image image, Int32& errorStatus)
at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
at GalleryServerPro.Business.Watermark.ApplyImageWatermark(Image recipientImage)
at GalleryServerPro.Business.Watermark.ApplyWatermark(String filePath)
at GalleryServerPro.Business.ImageHelper.AddWatermark(String filePath)
at GalleryServerPro.Web.handler.getmediaobject.ProcessMediaObjectWithWatermark()


Please help!

George
Roger Martin
Posted: Wednesday, November 05, 2008 3:58:53 PM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
I've been digging into this and there may be an issue where the watermark functionality is not thread-safe. I don't have time at the moment to set up a load test to try to reproduce it, but I saw an opportunity in the code to add a lock that may prevent the bug.

Attached is a new version of GalleryServerPro.Business.dll that includes this lock. Replace your existing version with this one and let us know if things improve. Note that this dll will only work for version 2.1.3222.

File Attachment(s):
GalleryServerPro.Business.zip (124kb) downloaded 4 time(s).




Roger Martin
Lead Developer for Gallery Server Pro
lug668
Posted: Wednesday, November 05, 2008 5:17:22 PM
Rank: Member

Joined: 5/1/2008
Posts: 10
Location: Melbourne, Australia
Thank you Roger. So I have to upgrade to version 2.1.3222 first and then apply the dll?
Roger Martin
Posted: Wednesday, November 05, 2008 5:44:11 PM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
Yes, sorry. If you are on 2.1.3213 there is a good chance it will work without upgrading, though.

If you are on some other 2.1.XXXX version, you might try it anyway just to see if the original problem disappears. But you may get other exceptions, so do this only as a test and then revert back to your previous dll if you have any trouble.


Roger Martin
Lead Developer for Gallery Server Pro
lug668
Posted: Wednesday, November 26, 2008 5:55:25 PM
Rank: Member

Joined: 5/1/2008
Posts: 10
Location: Melbourne, Australia
Hi Roger,

Follow your instruction, I've tried to upgrade from 2.0.2898 to 2.1.3222. However, I've got this error when I run upgrade.aspx:

Code:

Server Error in '/GalleryServerPro' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>



My connectionstring in web.config looks like this:

Code:

<add name="SqlServerDbConnection" connectionString="Data Source=mydbservername;Initial Catalog=GalleryServerPro;Integrated Security=no;uid=mydbusername;pwd=mydbuserpwd;Application Name=Gallery Server Pro" />


I've tried to set mode=off to see error details but it didn't work. Can you please help?

Thanks,
George

Roger Martin
Posted: Thursday, November 27, 2008 7:49:50 PM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
Setting the customErrors mode to 'Off' means you won't get the generic error anymore, so you must not be doing it right. Perhaps you could copy and paste your web.config into this thread and I'll take a look. Make sure to blank out any passwords.


Roger Martin
Lead Developer for Gallery Server Pro
lug668
Posted: Thursday, November 27, 2008 8:36:32 PM
Rank: Member

Joined: 5/1/2008
Posts: 10
Location: Melbourne, Australia
Web.config
Code:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <configSections>
        <sectionGroup name="system.web">
            <section name="galleryServerPro" type="GalleryServerPro.Configuration.GalleryServerProConfigSettings, GalleryServerPro.Configuration" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false" />
        </sectionGroup>
        <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching" requirePermission="false" />
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>

    <connectionStrings>
        <clear />
        <add name="SQLiteDbConnection" connectionString="Data Source=|DataDirectory|galleryserverpro_data.sqlite;Version=3;" />
        <add name="SqlServerDbConnection" connectionString="Data Source=dbservername;Initial Catalog=GalleryServerPro;Integrated Security=no;uid=xxx;pwd=xxx;Application Name=Gallery Server Pro" />
    </connectionStrings>

    <cachingConfiguration defaultCacheManager="Cache Manager">
        <cacheManagers>
            <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" name="Cache Manager" />
        </cacheManagers>
        <backingStores>
            <add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" name="Null Storage" />
        </backingStores>
    </cachingConfiguration>

    <appSettings />

    <system.web>

        <pages theme="HelixBlue" styleSheetTheme="">
            <controls>
                <add tagPrefix="CA" namespace="ComponentArt.Web.UI" assembly="ComponentArt.Web.UI" />
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            </controls>
        </pages>

        <galleryServerPro configSource="config\galleryserverpro.config" />

        <!-- <trust level="Full"/> -->

        <globalization uiCulture="auto:en" culture="auto:en-US" />

        <xhtmlConformance mode="Strict" />

        <compilation debug="false">
            <assemblies>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </assemblies>
        </compilation>

        <!-- The <authentication> section enables configuration of the security authentication mode used by
         ASP.NET to identify an incoming user.
                The timeout is set to 129,600 minutes by default, which is 90 days. This allows the user to be automatically
                logged in (requires selecting the "Remember Me" checkbox during login which sets a persistent cookie).
                Note that when the user clicks "Log out", the persistent cookie is removed and the user will have to
                log in next time. -->
        <authentication mode="Forms">
            <forms loginUrl="login.aspx" defaultUrl="default.aspx" protection="All" timeout="129600" slidingExpiration="true" />
        </authentication>

        <authorization>
            <!--  <deny users="?" />-->
        </authorization>

        <!-- Configure the Membership provider.-->
        <membership defaultProvider="SqlMembershipProvider">
            <providers>
                <clear />
                <add applicationName="Gallery Server Pro" passwordFormat="Clear"
                 minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="2"
                 maxInvalidPasswordAttempts="50" enablePasswordReset="true" enablePasswordRetrieval="true"
                 passwordAttemptWindow="10" requiresQuestionAndAnswer="false"
                 requiresUniqueEmail="false" connectionStringName="SQLiteDbConnection"
                 name="SQLiteMembershipProvider" type="GalleryServerPro.Data.SQLite.SQLiteMembershipProvider" />
                <add applicationName="Gallery Server Pro" passwordFormat="Clear"
                 minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="2"
                 maxInvalidPasswordAttempts="50" enablePasswordReset="true" enablePasswordRetrieval="true"
                 passwordAttemptWindow="10" requiresQuestionAndAnswer="false"
                 requiresUniqueEmail="false" connectionStringName="SqlServerDbConnection"
                 name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" />
            </providers>
        </membership>

        <!-- Configure the Role provider.-->
        <roleManager enabled="true" cacheRolesInCookie="true" cookieProtection="Validation"
   defaultProvider="SqlRoleProvider">
            <providers>
                <clear />
                <add applicationName="Gallery Server Pro" connectionStringName="SQLiteDbConnection"
                 name="SQLiteRoleProvider" type="GalleryServerPro.Data.SQLite.SQLiteRoleProvider" />
                <add applicationName="Gallery Server Pro" connectionStringName="SqlServerDbConnection"
                 name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
            </providers>
        </roleManager>

        <!-- Configure the Profile provider.-->
        <profile defaultProvider="SqlProfileProvider">
            <providers>
                <clear />
                <add applicationName="Gallery Server Pro" connectionStringName="SQLiteDbConnection"
                 name="SQLiteProfileProvider" type="GalleryServerPro.Data.SQLite.SQLiteProfileProvider" />
                <add applicationName="Gallery Server Pro" connectionStringName="SqlServerDbConnection"
                 name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" />
            </providers>
            <properties>
                <add name="ShowMediaObjectMetadata" defaultValue="false" type="String"
                 allowAnonymous="true" />
            </properties>
        </profile>

        <anonymousIdentification enabled="true" />

        <httpHandlers>
            <remove verb="*" path="*.asmx" />
            <add verb="*" path="ComponentArtUploadProgress.axd" type="ComponentArt.Web.UI.UploadProgressHandler, ComponentArt.Web.UI" />
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
        </httpHandlers>

        <httpModules>
            <add name="ComponentArtUploadModule" type="ComponentArt.Web.UI.UploadModule, ComponentArt.Web.UI" />
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </httpModules>

        <sessionState mode="InProc" timeout="60" />

        <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs.
            The mode attribute must be one of these values: Off (No redirection is performed; all users get detailed
            error message), On (all users are redirected to friendly error page), RemoteOnly (local users see detailed
            error message, remote users are redirected) -->
        <customErrors mode="RemoteOnly" defaultRedirect="error/error.aspx">
            <error statusCode="403" redirect="error/error_404.aspx" />
            <error statusCode="404" redirect="error/error_404.aspx" />
        </customErrors>

        <!-- Enable / disable tracing. -->
        <trace enabled="false" pageOutput="false" localOnly="false" mostRecent="true" writeToDiagnosticsTrace="false" requestLimit="200" />

        <!-- Gallery Server 1.x had the home page at index.aspx, so provide automatic redirection if users had
        a bookmark to the old location. -->
        <urlMappings enabled="true">
            <add url="~/index.aspx" mappedUrl="~/default.aspx" />
        </urlMappings>

    </system.web>

    <!-- The maxRequestLength attribute specifies the maximum upload size (KB).
    To prevent requests larger than 2 GBytes, use maxRequestLength="2097151" The executionTimeout
    attribute specifies the maximum number of seconds a request is allowed to execute before being
    automatically shut down by ASP.NET. For 8 hours, use executionTimeout="28800". -->
    <location path="task/addobjects.aspx">
        <system.web>
            <httpRuntime maxRequestLength="2097151" executionTimeout="28800" />
        </system.web>
    </location>

    <location path="task/synchronize.aspx">
        <system.web>
            <httpRuntime executionTimeout="86400" />
        </system.web>
    </location>

    <location path="task/transferobject.aspx">
        <system.web>
            <httpRuntime executionTimeout="3600" />
        </system.web>
    </location>

    <location path="admin/backup-restore.aspx">
        <system.web>
            <httpRuntime executionTimeout="3600" />
        </system.web>
    </location>

    <system.diagnostics>
        <switches>
            <!--0 = Off,  1 = Error, 2 = Warning, 3 = Info, 4 = Verbose -->
            <add name="TraceLevelSwitch" value="0" />
        </switches>
        <trace autoflush="true" indentsize="2">
            <listeners>
                <!-- <add name="WebPageTraceListener" type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                <clear/>
                Use clear in non-Full trust environments, or delete tracing altogeter -->
            </listeners>
        </trace>
    </system.diagnostics>

    <system.web.extensions>
        <scripting>
            <webServices>
                <profileService enabled="true" readAccessProperties="ShowMediaObjectMetadata" writeAccessProperties="ShowMediaObjectMetadata" />
                <jsonSerialization maxJsonLength="2147483647" />
            </webServices>

            <scriptResourceHandler enableCompression="true" enableCaching="true" />
        </scripting>
    </system.web.extensions>

    <system.webServer>
        <!-- By default IIS 7 restricts uploads larger than about 30 MB. To allow larger uploads, use the <requestFiltering>
            element to set a new value. The attribute maxAllowedContentLength is in bytes, so to set a new value of 2 GB,
            use 2147483648 (2 * 1024 * 1024 * 1024).
            Note: If you get an error that requestFiltering cannot be overriden you must edit
            %windir%\System32\inetsrv\config\applicationHost.config file and change the string:
                <section name="requestFiltering" overrideModeDefault="Deny" />
            to:
                <section name="requestFiltering" overrideModeDefault="Allow" />

        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="2147483648"/>
            </requestFiltering>
        </security>
        -->
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
            <remove name="ScriptModule" />
            <add name="ComponentArtUploadModule" type="ComponentArt.Web.UI.UploadModule, ComponentArt.Web.UI" />
            <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory" />
            <remove name="ScriptHandlerFactoryAppServices" />
            <remove name="ScriptResource" />
            <add name="ComponentArtUpload" verb="*" path="ComponentArtUploadProgress.axd" type="ComponentArt.Web.UI.UploadProgressHandler, ComponentArt.Web.UI" />
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </handlers>
        <defaultDocument>
            <files>
                <clear />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>
Roger Martin
Posted: Thursday, November 27, 2008 8:40:33 PM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
You didn't change the customErrors mode. Look for this section:

Code:
<customErrors mode="RemoteOnly"/>


Change it to this:

Code:
<customErrors mode="Off"/>


Then you will get a more descriptive error.


Roger Martin
Lead Developer for Gallery Server Pro
lug668
Posted: Thursday, November 27, 2008 8:48:27 PM
Rank: Member

Joined: 5/1/2008
Posts: 10
Location: Melbourne, Australia
Thanks. Now I've got the custom error:

Code:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 54:         <compilation debug="false">
Line 55:             <assemblies>
Line 56:                 <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 57:                 <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
Line 58:                 <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />


Source File: d:\webroot\galleryserverpro\web.config    Line: 56

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Roger Martin
Posted: Friday, November 28, 2008 10:20:17 AM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
You need to either install MS Ajax or upgrade to .NET 3.5.

If you upgrade to .NET 3.5, make sure you use the 3.5 version of web.config.


Roger Martin
Lead Developer for Gallery Server Pro
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.2 (NET v2.0) - 9/27/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.