Compatibility with Existing ASP.NET Application

There are chances that you may want to make the generated scripts of ASP.NET XMLMaker work with your existing ASP.NET application.

 

Always use standalone ASP.NET application whenever possible

It is recommended that you use a standalone ASP.NET application for scripts generated by ASP.NET XMLMaker. Generate script to a separate destination folder (Do not share the same destination folder with other ASP.NET applications) and create a separate ASP.NET application in IIS Manager for the folder. Then there is no need to do anything else and you can skip the following sections.

 

Use the same .NET Framework version

If you have to mix the generated scripts with other ASP.NET application, the first thing you need to make sure is that you use the same .NET Framework version in all ASP.NET applications. ASP.NET XMLMaker requires .NET Framework v2.0 or later. It won't work if your existing application is still using .NET Framework v1.0.

 

Use the same language (VB or C#)

Make sure you use the same language (VB or C#) in all ASP.NET applications. It won't work if one application uses VB and the other uses C#.

 

Avoid overwriting web.config

If you mix the generated scripts with other ASP.NET application, the generated default page and web.config may overwrite the same pages for the existing ASP.NET application because these file names are typical and both applications may have the same file names. If you generated the output scripts to the same destination folder of an ASP.NET Maker project, those files will be overwritten.

To avoid overwriting default.aspx of existing ASP.NET application in the destination folder, ASP.NET XMLMaker uses a default page of defaultx.aspx (with a "x" after "default", there may be prefix or suffix also, depending on your output filename settings).

To avoid overwriting web.config, do not check the row for web.config when you are prompted to select files to generate. The row for web.config is the last second row in the grid.

 

 

Adding Microsoft.VisualBasic Assembly to web.config

ASP.NET XMLMaker uses the Microsoft.VisualBasic assembly (both C# and VB), if you mix the generated scripts with other ASP.NET application, then the scripts are using your existing ASP.NET application's web.config, you may need to add the Microsoft.VisualBasic assembly to the web.config of your existing ASP.NET application, especially when your existing application is using C#. Open the web.config with a text editor, look for the assemblies element, if it does not already include the assembly, add it as follows:

<assemblies>
    <add assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    ...
</assemblies>

 

Authentication and Authorization

ASP.NET XMLMaker does not support security itself, if you mix the generated scripts with other ASP.NET application (web.config is not generated), the scripts uses the authentication mode of the existing web.config.

When using forms-based authentication in ASP.NET applications (e.g. ASP.NET Maker generated application with Advanced Security), only authenticated users are granted access to pages in the application. Unauthenticated users are automatically redirected to the page specified by the loginUrl attribute of the Web.config file where they can submit their credentials. If you want to permit users to access the pages generated by ASP.NET XMLMaker without requiring authentication, then you may need to modify the location element in the web.config file.

For example, the following code allows an anonymous user to gain access the Page1.aspx page:

<configuration>
    ...
    <location path="Page1.aspx">
        <system.web>
            <authorization>
                <allow users="?"/>
            </authorization>
        </system.web>
    </location>
    ...
</configuration>

 

Also See:

HOW TO: Control Authorization Permissions in an ASP.NET Application
Configuration <location> Settings
Generate Settings
ASP.NET Settings

 

 

 

 
 ©2008 e.World Technology Ltd. All rights reserved.