Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 4th, 2008, 12:26 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default InitializeCulture causing Sqlexception Error...

I'm testing my site ready for deployment.
I used ASP.NET 2.0 as an example.
I was successful running thebeerhouse website to bring up the registration page.
My page is pretty much the same.
But I'm getting this error an it is taking too long to figure out, because I don't have a lot of free time to do it.

The DB is the same as well with a different name. My Script makes the necessary changes, but again I doubt this is the issue.


Any help would be appreciated. THKS!




=====================================
=
= Error
=
=====================================

CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\goodsensesys\App_Data\GOODSENSE SYS.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.


protected override void InitializeCulture()
      {
         string culture = (HttpContext.Current.Profile as ProfileCommon).Preferences.Culture;
         this.Culture = culture;
         this.UICulture = culture;

      }


=====================================
=
= BasePage : The error is point at my InitializeCulture which is exactly the same as wrox.
= No using GSS.....store; because I'm not using a store. This should not make a difference.
=
=====================================


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using GSS.GoodSenseSys;
/// <summary>
/// Summary description for BasePage
/// </summary>
namespace GSS.GoodSenseSys.UI
{
    public class BasePage : System.Web.UI.Page
    {
            //
            // TODO: Add constructor logic here
            //

      protected override void InitializeCulture()
      {
         string culture = (HttpContext.Current.Profile as ProfileCommon).Preferences.Culture;
         this.Culture = culture;
         this.UICulture = culture;

      }



=====================================
=
= WebConfig : profile displayed below
=
=====================================

    <profile defaultProvider="GSS_ProfileProvider">
      <providers>
        <add name="GSS_ProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      </providers>
      <properties>
        <add name="FirstName" type="String" />
        <add name="LastName" type="String" />
        <add name="Gender" type="String" />
        <add name="BirthDate" type="DateTime" />
        <add name="Occupation" type="String" />
        <add name="Website" type="String" />

        <group name="Forum">
          <add name="Posts" type="Int32" />
          <add name="AvatarUrl" type="String" />
          <add name="Signature" type="String" />
        </group>
        <group name="Address">
          <add name="Street" type="String" />
          <add name="PostalCode" type="String" />
          <add name="City" type="String" />
          <add name="State" type="String" />
          <add name="Country" type="String" />
        </group>
        <group name="Contacts">
          <add name="Phone" type="String" />
          <add name="Fax" type="String" />
        </group>
        <group name="Preferences">
          <add name="Theme" type="String" allowAnonymous="true" />
          <add name="Culture" type="String" defaultValue="en-US" />

        </group>
      </properties>
    </profile>

  #2 (permalink)  
Old March 12th, 2008, 09:45 PM
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've gone through various processes to recreate the DB to see if that is the issue, but after 8 new versions I get the same thing.

I created the DB through the aspnet_regsql tool.


Something to do with Culture and UICulture.

When I try to use the ASPNET Config tool to add users I get errors too.


I used the scripts CreateAll, but still no luck.
The scripts require too much modification to run it through VS2005 because it doesn't recognize the same syntax like GO, etc...
I can connect using VS2005 Server Explorer or Sql2005 Mangement Tool.
This is holding up everything because I can't test for deployment with DB errors.

My files are located in inetpub directory with IIS 5.0 running.



  #3 (permalink)  
Old March 14th, 2008, 12:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't understand why you think the Culture has anything to do with the error you specified. The error message you gave has a detailed explanation of the issue. You need to study that message and check the things it's telling you to check. We can't do it for you.

This is the error:
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\goodsensesys\App_Data\GOODSENSE SYS.mdf failed.

This is the detailed explanation:
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

So you have 3 things to check on. Actually 2, since there is no UNC path here.

Eric

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catching a SQLException error digriz60 ASP.NET 1.0 and 1.1 Basics 5 January 14th, 2008 03:14 PM
SqlException error akibaMaila VB.NET 2002/2003 Basics 3 August 25th, 2005 10:14 AM
java.sql.SQLException: Error loading JDBC Driver jdphjp Java Databases 1 August 5th, 2004 01:46 AM
Refresh causing Query Engine Error Deecay Crystal Reports 0 July 10th, 2003 10:27 PM



All times are GMT -4. The time now is 01:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.