cancel
Showing results for 
Search instead for 
Did you mean: 

Web.config in Visual Studio 2010 not working with Crystal Reports version 13

Former Member
0 Kudos

I have upgraded to Visual Studio 2010 and upgrading an existing 2005 Web ASP site to 2010. When I edit a report form with a Crystal Report in it - it puts the following line in the Web.config file,

"CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"

But then the program always errors out upon starting of the web application until I take these added lines out of the web.config file.

I am using Crystal Reports 13 for Visual Studio 2010.

Please help.

Mike

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Mike,

What is the exact error message that you are facing? and the exception?

Are you able to create a new Crystal Reports .NET application with VS 2010?

- Bhushan

Former Member
0 Kudos

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information
ModuleIIS Web Core
NotificationBeginRequest
HandlerNot yet determined
Error Code0x800700b7
Config ErrorCannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'CrystalImageHandler.aspx_GET'
Config File\\?\C:\inetpub\wwwroot\Preneed Web MI\web.config
Requested URLhttp://localhost:80/Preneed Web MI/default.aspx
Physical PathC:\inetpub\wwwroot\Preneed Web MI\default.aspx
Logon MethodNot yet determined
Logon UserNot yet determined
former_member188030
Active Contributor
0 Kudos

Could you try placing (replacing) below tags in your web.config.

<httpHandlers>

      <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

    </httpHandlers>

  </system.web>

<system.webServer>

    <handlers>

      <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>

    </handlers>

    <validation validateIntegratedModeConfiguration="false"/>

  </system.webServer>

Also, try developing a simple CR.NET web app and see if it reproduces the issue.

Set the app pool pipeline mode to classic.

- Bhushan.

Former Member
0 Kudos

Bhushan,

These lines you want me to add are the problem lines of the configuration file that Crystal Reports adds. When I take these lines back out of the Web.config file, things run fine. The problem is that when I edit a report form with a Crystal Report Viewer in it, Crystal Reports automatically put these lines back into the Web.config file again.

It says there is a duplicate, but I have checked everywhere in the INETPUB directory and subdirectories, and there are no duplicate entries of these lines anywhere.

When I make a new web site and use Crystal Reports Viewer, it doesn't act up, but the new web site is not under my INETPUB directory, but in my Visual Studio projects directory.

The site I am trying to correct this on is the default web site for the server.

Anymore suggestions?

Thanks for your help,

MIke

former_member188030
Active Contributor
0 Kudos

Use Process Monitor and check the location web.confog file being loaded by your app.

- Bhushan.

Former Member
0 Kudos

Bhushan,

I used the process monitor and looked up all the *.config files it loaded, but there didn't seem to be any problem there.

That did get me thinking though about the default startup document for my web site in the IIS configuration for that site. Mine is "default.aspx", but it was not the first in the list, so I moved it up to the top of the list. This automatically made an entry in the web.config file with this default startup document list order. Then things seem to work fine and the Crystal Reports Designer no longer puts those lines into the web.config that were causing the problem.

This is what was added to my web.config by IIS.

    <system.webServer>

        <defaultDocument>

            <files>

                <clear />

                <add value="default.aspx" />

            </files>

        </defaultDocument>

    </system.webServer>

Thanks for your help in guiding me in the right direction.

Mike


Answers (0)