DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 7 Aug 2007 19:10:02 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.webservices        back       

Thread Index
  1    DB
          2    Wes Clyburn Wes


asp.net 2.0 and sql 2005 Express aspnetdb.mdf   
I have a web application that I have a dilema in trying to publish it to my 
isp. The problem stands as is... the database is created in the default 
aspnetdb.mdf file on my local machine and I can not create a database using 
the same name (I guess for security reasons) on the shared hosting server 
when I do I get a message that one already exists. I am new to dynamic 
development and 3 tier websites I'm  hoping that I can find a workaround 
concerning this matter
Date:Tue, 7 Aug 2007 19:10:02 -0700   Author:  

RE: asp.net 2.0 and sql 2005 Express aspnetdb.mdf   
You'll need to edit your web.config with an appropriate connection string 
pointing to your database. It's very likely that your host does not even run 
SQL Express on the web server, and so local databases are not possible.

     <connectionStrings>
          <add name="SiteSqlServer" connectionString="Data 
Source=****;Initial Catalog=******;User ID=******;Password=****" 
providerName="System.Data.SqlClient"/>
     </connectionStrings>

In addition, you'll need to make sure that each provider your application 
uses this connection. If you do nothing to them at all, then they'll use 
their default settings... which will make them try to use aspnetdb and fail.

For example, if you're using membership, then you'll need to add a section 
to configure it like this:

<!-- Customized to use the connectionStringName configured above -->
    <membership defaultProvider="CustomizedMembershipProvider">
      <providers>
        <add name="CustomizedMembershipProvider"
             connectionStringName="siteSqlServer"
             applicationName="Yourappname"
             type="System.Web.Security.SqlMembershipProvider" />
      </providers>      
    </membership>

You're still using the same SqlMembershipProvider that would be used without 
this section, but you're giving it the correct attributes.

You'll need to do this for every provider your app uses (except 
SiteMapProvider, which uses a file by default): Profile, Personalization, 
Role...

The ASP.NET Admin Tool will honor this configuration when you launch it from 
your IDE, too.
Date:Tue, 14 Aug 2007 15:02:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us