Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configuring web.config for 2 applications 1

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
0
0
US
Hello,
I am trying to configure my web.config file to handle another application. I am not having much success and would greatly appreciate any help on this matter. Thanks in advance!

Here's the new app web.config file that i want to add to the main app web.config file(bottom of thread):
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
     <!-- application specific settings -->
          <appSettings>
               <add key="ConnectionString" value="server=localhost;database=IBS;uid=user;pwd=password" />
               <add key="VerisignPartner" value="" />
               <add key="VerisignUsername" value="" />
          </appSettings>
     
     <!-- forms based authentication -->
     <system.web>
          <trace enabled="false"
          localOnly="true"
          pageOutput="true"
          requestLimit="15" 
          traceMode="SortByTime"/>
     
     
          <compilation debug="true"/>
         <!-- enable Forms authentication -->
         <authentication mode="Forms">
              <forms name="OZMStoreAuth" loginUrl="login.aspx" protection="All" path="/" />
         </authentication>
          
          <!-- enable custom errors for the application -->
          <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx" />
          
          <!-- disable session state for application -->
          <sessionState mode="Off" />
     </system.web>
     
     <!-- set secure paths -->
     <location path="Checkout.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="OrderList.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="OrderDetails.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="OrderPreview.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="UpdateBilling.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="UpdateShipping.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="UpdateShippingBilling.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
     
     <location path="MyAccount.aspx">
          <system.web>
               <authorization>
                    <deny users="?" />
               </authorization>
          </system.web>
     </location>
</configuration>
---------------------------
This is my main web.config file:
Code:
<configuration>
    <configSections>
        <section name="nSurveySettings" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <sectionGroup name="communityStarterKit">
            <section name="Isp" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
            <section name="pagePaths" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
            <section name="database" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
            <section name="services" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
        </sectionGroup>
    </configSections>

    <communityStarterKit>
        <Isp>
            <add key="IspUsername" value="user" />
            <add key="IspPassword" value="password" />
      <add key="TimeZoneAbbreviation" value="EST" />
   <add key="GmtTimeOffset" value="-5" />
        </Isp>

        <pagePaths>
            <add key="basePage" value="/communityDefault.aspx" />
            <add key="baseService" value="/communityService.asmx" />
        </pagePaths>
        
        <database>
  
    <add key="connectionString" value="Server=SQL300;Data Source=localhost,1433;Initial Catalog=myDB;User Id=user;Password=password; "  /> 
        </database>

        <services>
            <add key="enableServiceTimer" value="true" />
        </services>

     </communityStarterKit>
     <nSurveySettings>
          <!-- Path where you copied the nsurvey images, results bar must be in the ~/images/bar directory -->
          <add key="NSurveyImagesPath" value="~/Images/" />
          <add key="NSurveyXmlDataPath" value="~/XmlData/" />
          <!-- SMTP Server used to send out the standard and invitation emails -->
          <add key="NSurveySMTPServer" value="mail.mybowler.com" />
          <add key="NSurveySMTPServerPort" value="25" />
          <add key="NSurveySMTPServerAuthUserName" value="" />
          <add key="NSurveySMTPServerAuthPassword" value="" />
          <add key="EmailingProviderAssembly" value="Votations.NSurvey.Emailing" />
          <add key="EmailingProviderClass" value="Votations.NSurvey.Emailing.SystemWebEmailing" />
          <!-- Assembly and pages that use the assembly must be in the same virtual directory -->
          <add key="WebDAL" value="Votations.NSurvey.SQLServerDAL" />
          <add key="NSurveyConnectionString" value="Server=SQL300;Data Source=localhost,1433;Initial Catalog=survApp;User Id=user;Password=pword; "  /> 
     </nSurveySettings>

     <system.web>   
        <compilation debug="true" />
        <customErrors mode="Off" />
        <httpModules>
            <add name="CommunitiesModule" type="ASPNET.StarterKit.Communities.CommunitiesModule,ASPNET.StarterKit.Communities" /> 
        </httpModules>

        <authentication mode="Forms">
          <forms loginUrl="Users_Login.aspx"/>
          <forms name="NSurveyWebAuth" loginUrl="~/NSurveyAdmin/login.aspx" protection="None" timeout="60">
               <credentials passwordFormat="Clear">
                    <user name="user" password="pword" />
               </credentials>
          </forms>
        </authentication>

  <pages validateRequest="false" />
        

<!-- We need to make sure this is set high enough so that the user doesn't get a timeout error while uploading. -->
<!-- The largest file size that ASP.NET will allow for uploads. -->
        <httpRuntime maxRequestLength="1000" /> 

        <httpHandlers>
   <add verb="*" path="*.jpg" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
   <add verb="*" path="*.jpeg" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
   <add verb="*" path="*.gif" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
        </httpHandlers>

        <webServices>
            <protocols>
                <add name="HttpGet"/> 
            </protocols>
        </webServices>
    </system.web>
</configuration>

 
Why do you want to fold them both into one?

Web.config files are meant to be local-scope files, so that you can even have one per folder to override the parent web.config.
 
Ok, I thought I was only permitted to have one per app. What about the DLL files, there can only be one bin directory, correct? Thanks,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top