Deploying A Database Witch Uses The Membership Tables
Jan 15, 2006
I have a website that uses an SQL 2005 Express database, with the added aspnet_users, aspnet_roles tables etc' inside it.
(That is not an .mdf file, but in the databse itself)
Are there any guidelines for moving this kind of database to the deployment server, which also has SQL Express ?
Is it just a case of detach + attach ?
View 1 Replies
ADVERTISEMENT
Jan 17, 2002
Hi,
I have a SQL 6.5 DataBase in a product server and i copied the .dat an the .log from the product server to an other server (the test one). I want read and access this database on the test server on witch SQL Server 6.5 is installed whithout saving and restoring the database.
Can some body help me? please !
Thanks
View 1 Replies
View Related
May 26, 2007
Hi, I have limited control on the server I use. I can not create data bases but can add tables and edit the data base that has been created for me. So what I would like to do is be able to use a tool such as aspnet_regsql through SQL Server Express to add the tables that Membership would automatically create. Any help in pointing me in the right direction would be great
Thanks
howlinhuskie
View 6 Replies
View Related
Nov 15, 2007
Hi, this might be a newbie question as I don't know too much about databases.My web host only lets me have 1 database, so I am trying to rename all the tables with a prefix, then import them to the server. I'm using MsSql-2005, VWD, Management Studio Express.My error when I run the .sql script is:Msg 208, Level 16, State 1, Procedure vw_aspnet_MembershipUsers, Line 3Invalid object name 'dbo.aspnet_Membership'.Msg 208, Level 16, State 1, Procedure vw_aspnet_Users, Line 3Invalid object name 'dbo.aspnet_Users'.Msg 208, Level 16, State 1, Procedure vw_aspnet_Profiles, Line 3Invalid object name 'dbo.aspnet_Profile'....I suspect that it is because I renamed the "aspnet_Membership" table to "Company1_aspnet_Membership" (I made a database diagram, then renamed the aspnet tables in Properties). Has anyone run into this before? Does anyone know how to fix it?
View 5 Replies
View Related
Nov 10, 2007
Hello, i have a table called Mail, inside of this table are all the user mailmessages, now i want to display to the user how many messages he has, should i use:
SELECT count(*) FROM mailmessages WHERE (username = @UserName)
or
Should i create a table with a field named 'mailmessages' for every user, then in this table i update the 'mailmessages' whenever the user deletes or recieves a new message.
witch is the best option to use, lets assume that we have afew million mailmessages? performace gains? fastest?
(This will be displayed on every single page)
View 2 Replies
View Related
Jul 17, 2007
I'm a relative newbie to ASP.NET development (web development in general) so please forgive the ignorance. ;-)
Ok, I'm using VWD to design and test my application and I'm using the standard membership provider system. I've read in various places not to muck around with the aspnet_* tables as it can cause havoc hehe. Therefore, I've created my own Member table to accommodate more fields that the aspnet_Users table does not have (since I don't want to mess around with that table) such as address, city, town, zip, birth date, etc. Obviously, I have a field in Member that corresponds to the userId primary key in aspnet_Users. Now, there are times when I need to display the username of a person's profile on a page.
SELECT aspnet_Users.UserName<br>FROM aspnet_Users, Member<br>WHERE querystringid=Member.memberId AND Member.userId = aspnet_Users.UserId
Now, this seems fine and dandy when there are few entries in the aspnet_Users table, but what if I tried that query when aspnet_Users grew to a hypothetical one million entries?? Does anyone know if those fields in aspnet_Users are properly indexed? I can't seem to determine one way or another with VWD's database explorer. I don't want to run the risk of a full table scan. But if those fields aren't indexed, I don't know if I should modify that table in any way.
What to do?
TIA
View 4 Replies
View Related
Feb 20, 2007
Hi all,
First ASP.NET project - please be gentle !
OK. Ready to add personalisation and membership. I have VS2005 Professional, including SQL Server 2005 developer, but I understand that VS2005 defaults to creating a local SQL Express file in the App_Data directory and that suits me just fine for now. Unfortunately I can't get VS to create it for me and the ASP.NET Configuration tool complains it can't connect to the database.
First, some REALLY dumb questions to show how little I really know ...
if the application is using a SQL Express file, does the SQL Server 2005 process need to be started in order to access the local database file (or does it just get opened like an access database)
does the Broswer process need to be started - this is all just running on my local machine
when I finally publish this site on my hosted service I could do with understanding what will need to be done to get THAT database accessed ... maybe cross that bridge later
I can go to the VS command prompt and run aspnet_regsql.exe in wizard mode. Going through the steps on that I could give it my SQL Server 2005 server name (after I start it) but that's not what I'm trying to do. I just want it to create and connect to a local file in the App_Data.
machine.config shows ...
<connectionStrings> <add name="LocalSqlServer" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> <!-- <add name="LocalSql2005" connectionString="Data Source=MICKSPCSSLMJ;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" /> --> </connectionStrings>
The commented connection string I used to temporarily prove that I could access SQL2005. It's no longer used and I've put the other references back to "LocalSqlServer" as below ... <membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer"
applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>The profile provider is clearly pointing to "LocalSqlServer" which in turn points to : connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
What am I missing please ?
View 3 Replies
View Related
Jun 9, 2008
Hello, I have an ASP.NET Membership Database that exists on a remote server. I have been using this database as I developed my ASP.NET 2.0 application locally. When I attempted to promote my ASP.NET 2.0 application to production, I am unable to connect to that same remote database. Oddly, there is another database on that same remote server that I can access from my ASP.NET application in both development and production.
Can anyone explain to me what could cause this?
Thank you!
View 3 Replies
View Related
Dec 29, 2004
I need to create a membership database that includes levels and premiums for each level. Can anyone offer any examples of how this should be done? What tables I would need and how they would be related to each other?
Thank you for any suggestions,
View 3 Replies
View Related
Jan 22, 2008
I recently transfered my web app to my Windows 2003 server and am having difficulty getting the system to allow me to login.I am using MS SQL Express 2005 and the SQL Express Manager.I have a user/password setup with SQL Authentication. It appears that I am connecting okay, but I am unable to login to the site. I have tried three different accounts with no luck. I know I am using the correct passwords.What permissions do I have to grant my database user to allow me to login to my site?As I am new to SQL Express and the manager, a more specific reply would be very helpful.Thank you,Joshua Foulk
View 1 Replies
View Related
Dec 12, 2007
Hi,
I am using SQL server 2000 and when I look in the database role membership I have SuperUser as a role.
Can I have the definition of SuperUser?
View 1 Replies
View Related
Jan 17, 2007
Hi, I hope this is in the correct category. I have two .mdf files. aspnetdb.mdf and emotiveonline.mdf. My host provider can only give me one database in sql server express 2005. Now I am no genius when it comes to programming and that kind of stuff but those two mdf files would be seen as 2 databases right? What I would like to know is that if I can but everything into one mdf file and how would i go about doing that. My website is almost finished and just thought about this now. Would like to do the changes as soon as possible so that I won't sit with a humongous problem later on. Thank you in advance. Kind regards,Ruan Rossouw
View 2 Replies
View Related
Apr 25, 2007
Hi, i have a new site built in .net using the login/membership system. i have a legacy database (access) of users from the previous site with email, name, password, etc.Is it possible to import this data straight into my new membership tables through some insert statement, software or through some other way?
View 1 Replies
View Related
Jun 3, 2006
I am trying to run one SQL Express database for two separate applications that will also use the Membership framework. My database is set up fine and works between both applications 100% as needed with the exception of Membership which I am fairly new to.
From my understanding given the following link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000022.asp
I need to install membership on the database. So I did the following
(allow remote connections with TCIP/IP and named pipes)
Started SQL and even re-booted
Ran: aspnet_regsql.exe -E -S localhost -A m
I even tried to run it by replacing localhost with MSSQL$SQLEXPRESS
All attempts gave me an error saying it could not connect and most likely because remote connections is disabled.
I think the reason for all this is because I don’t actually have the “real? IIS installed but rather I am using the instantiated version that automatically comes up when starting a ASP.NET 2.0 application.
I am assuming I need to set everything up such that I am using the real IIS rather then the default one in visual studio.
Is this correct? Or do I have something else?
View 2 Replies
View Related
Aug 23, 2007
So I can't quite understand what's going on here... I've watched the video tutorial on ASP.NET about creating and securing my site using Membership (configuring roles and users), and I noticed that it creates a database in my App_Data folder (ASPNETDB, I think it's called). And I've got all that working on my local machine, but I'm confused as to how to move it to my server.My hosting provider is M6.net, and they've told me that if I want to upload a database to their server, I have to create it using my admin panel, then upload the file and they'll fill it in for me. My question is this: if I give them the database that's automatically created when I use login controls on my website LOCALLY, will that database still provide the correct membership functionality for my website when it's run from the web server? Such that I can give them (M6) the ASPNETDB (containing all the usernames/passwords/rules? I've already specified for my local site), have them populate the similarly titled database on the server, and have it still work with my pages?I'm also confused as to why that database doesn't have a connection string specified in the web.config file...can anyone shed some light on that?As I have no direct access to the database server on my hosting provider, I need to create the membership database with all the correct details prior to uploading it to my server - if simply using the locally generated copy won't work, what should I do?Lastly, the video tutorial says to go to the ASP.NET Configuration page to manage users, roles, security settings, etc., but I don't seem to have access to that through M6. Instead, I have access to a FrontPage configuration page that is strikingly similar in content to that ASP.NET Configuration page featured in the video, in that it also allows user and role management capability - is this the same thing under a different guise?
View 3 Replies
View Related
Aug 1, 2007
Hello,
I'm trying to create a web page that is protected by a user login. I want the user data to be stored in an access database file and not an SQL Server express database.
I was following this guide on msdn:
http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx
However, I was doing everything locally using a file system and not IIS. (Which seemed to work fine)
My main problem is that I cannot get the membership information stored in an access database. The only provider option was one for the SQL server express. I think I will have to make a custom provider? However, I read through some of that documentation and was equally confused. ( http://msdn2.microsoft.com/en-us/library/Aa479031.aspx )
Anyone have a solution?
View 7 Replies
View Related
May 7, 2008
In my site, when a user registers, I need to create rows in additional tables besides aspnet_Users. So, I need to be able to pass the generated userId guid to subsequent SqlCommands. I'm having a terrible time with this. What's the correct way to set up a SqlParameter so that it will accept a guid? I keep getting this error: "Conversion failed when converting from a character string to uniqueidentifier."
I've tried creating the parameter both with and without a SqlDbType.
cmd.Parameters.AddWithValue(paramName, guid);
and
SqlParameter p = new SqlParameter(paramName);p.SqlDbType = SqlDbType.Guid;cmd.Parameters.Add(p);
and I get the same error either way.
Driving me nuts! Any help appreciated.
View 1 Replies
View Related
Nov 7, 2006
what is the easiest way to deploy a database for a webapp? i have create table scripts but waht is the easiest way to go about inserting data into lookup tables? would i have to write insert statements or is there some other way to do it
View 2 Replies
View Related
Aug 21, 2006
I used VWD 2005 Express to create my web application (that uses a sql 2005 database), and now I'm trying to deploy it. I was to understand that all I had to do was to upload all my files to the root folder and the web host's server (webhost4life.com). However, they require me to upload the sql 2005 db to a seperate sql server using a control panel that is very clunky. Does anyone know how to upload the sql 2005 db to the host server or an online tutorial where I could go to learn? Thanks for the help!
View 1 Replies
View Related
May 4, 2006
Hi,
We are using SQL-Server (2005) for the first time and have developed an app that uses 2 dozen tables and a bunch of SP, triggers, etc.
How do we get our entities to our client site without a lot of copying and pasting? How about the data we want to upload for lookup tables - how would we get the data there?
Moreover, how do we sync stored procedures with the live database as we make changes during development?
Thanks,
Mark
View 1 Replies
View Related
Apr 8, 2008
I have developed a VS2008 .net application using Sql Server express 2005. Running this on my development machine works fine but after i deploy to a client machine i get:
Cannot open user default database. Login Failed for user 'mycomputernameadministrator'
The client machine has sqlserver express 2005 installed using all instllation defaults
My connection string is:
Data Source=.SQLEXPRESS;AttachDbFilename=c:mydatamyfile.mdf;Integrated Security=True;User Instance=False"
I want to be able to deploy my app to any client PC without any database user login (i use my own built in to app) or errors obvoiusly
Could someone give me a step by step to resolve, much appreciated
Chris Anderson
View 4 Replies
View Related
Aug 26, 2013
Database project “BaseDatabaseProject” has a single table called “BaseTable.”Database projected “DerivedDatabaseProject” has a single tabled called “DerivedTable” and has a database referenced to “BaseDatabaseProject” where the location is set to “Same database.”Using SSDT for Visual Studio 2012, I right click on DerivedDatabaseProject and select publish. I set the connection to my localhost database and give the database a new name that does not currently exist. If I click the generate script button, I see a script that first adds BaseTable and then adds DerivedTable. When I push databse, my local instance now contains a new database with both tables.
This is not the same result as I have experienced with SQLPackage.exe from SQL Server Data-Tier Application Framework (July 2013). I have been trying to deploy using the SQLPackage and have found that when I do so, it only adds the DerivedTable. Any elements from the BaseDatabaseProject are being omitted. This is evident if I generate a script (the two scripts are otherwise identical aside from the missing part from BaseDatabaseProject) or if I try to publish.The syntax I have been using for SQLPackage.exe is
SqlPackage.exe /a:Publish /sf:[mylocation]DerivedDatabaseProject.dacpac /tdn:DerivedDatabaseProject /ssn:localhost
SqlPackage.exe /a:Script /sf:[mylocation]DerivedDatabaseProject.dacpac /of:true /tdn:DerivedDatabaseProject /tsn:localhost /op:[mylocation]DerivedScript.sql
Am I missing a needed parameter when I’m running SQLPackage.exe or is this an issue with DACFx?
View 2 Replies
View Related
Apr 4, 2008
hi,I was redirect to this URL* based on Deploying a SQL Database to a Remote Hosting Environment,pertaining to my question on how do I convert MDF file to .SQL.I had downloaded and installed the program recommended that is Database Publishing Wizard.but the problem is now, there isn't any context menu "Publish to Provider" * when i right click on thedatabase aspnetdb.mdf..please advice me. thanks.* Reference : http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx
View 4 Replies
View Related
May 9, 2005
how deploying a local database to target machine?
View 1 Replies
View Related
Jan 17, 2006
hi, i hope this is the correct forum?i have developed a small asp.net 2.0 web site with vwd using sqlExpress which appears to just bean data file and a log file in my app_data directory. there are two databases, the users one that is created by the login manager and my own that i created to store data. this all works fine on my laptop. i have an xp-pro machine setup with IIS and the frontpage web extentions, i have also installed the .net framework v2.0 on it and done all the windows updates. i have given app_data read/write access for the aspnet and network service users.i used the copy site feature of vwd to install on the xp box and although the site seems to workwhen it needs to bind a gridview to my sqldatasource it gives an error Cannot open user default database. login failed.Loginfailed for user 'rlxpaspnet'Any ideas? i have googled and tried all sorts, but to no avail, so i throw my self on your mercy!Cheers,russ
View 5 Replies
View Related
Apr 29, 2008
Hi there. I've created a windows forms app that connects to a sql server express database. now that it's working on my box, i need to install the entire solution on the end user's machine.
what's the best way to move the database? I found this article:
http://msdn.microsoft.com/en-us/library/ms165716.aspx
but i'm wondering if anyone can give me some insights based on your own experience.
I'm using ms visual studio 2005 and sql server express 2005.
I'm hoping that all i'll really have to do is copy everything over to the new machine and then edit my connection string in the .exe.config file for my app.
Thanks in advance for your help.
View 5 Replies
View Related
Jan 18, 2008
I've written a ClickOnce app that deploys a Sql Server Express data file (.mdf) and log file (.ldf) along with the other application files. SQL Express SP2 is a prerequisite for this app. After the applicaiton installs and starts up it copies these files to a specific folder and attaches them by calling the AttachDatabase() method of a Microsoft.SqlServer.Management.Smo.Server object.
This method works fine using Windows XP, however when I run it on Windows Vista I get the following exception:
Microsoft.SqlServer.Management.Smo.FailedOperationException: Attach database failed for Server 'localhostSQLEXPRESS'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Unable to open the physical file "C:WashMasterDatabasewasshmaster.mdf". Operating system error 5: "5(Access is denied.)".
This exception occurs when I try to programmatically attach the database.
I've searched through the MSDN forums for a solution and I've only found two suggestions:
1.) Create all database connections using a User Instance.
2.) Create the database (using SQL) in the target folder, rather than copying it over from the deployment folder.
I don't like the idea of using User Instances because my entire data access layer is currently written using Ole and I would rather not rewrite it if I don't have to. I cannot find any way to use User Instances with Ole.
I also don't like the idea of creating the database using SQL because it is fairly large.
Here are my questions:
1.) Can User Instances be used with Ole?
2.) Can I somehow programmatically set the permissions of the copied data and log files so that SQL Express can access them without error?
3.) Is there a better method for doing what I'm trying to do or am I destined to have to either rewrite in data access layer so I can use User Instances or create my large database rather than copy it to the target directory?
Thanks.
View 4 Replies
View Related
May 10, 2007
Hi,
I am developing a application which is dependent on Sql database (mdf).
I want to know how should i need to deploye or Package the database along with my
application , would i need to instal the sql server exp on to the client system, or there
is any other way to do it , I know that an Access file can be accessed through the
application even the client system dont hav Office, Is there any such type of
mechanism , through which we can do the same with sql database
View 2 Replies
View Related
Jun 12, 2007
I have developped an ASP.NET 2.0 webb application localy on my workstation and have the MSSQL2000 database on a server.There has been no problem accessing the database during development.
Im now finnished and put the application on a web server.
No when i try to access the application i get the following problem as it tries to reach the database:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I still use the same database so remote connections are allowed and there are lot of application against that sqlserver already running.
I have anonumouse access and use a domain service account for the application and that very same account is added as a login to the sqlserver and a domainuser in the database.
I have Forms authentication in my web.config file.
the connectionstring i use look like this:
<appSettings> <add key="app1" value="Data Source=server01;Initial Catalog=database1; Integrated Security=SSPI;"/></appSettings>
Can somebody please tell me what is wrong and how to fix it. I dont change any configuration betweeen my workstation and the server in web.config
/ in pain!!
View 1 Replies
View Related
Feb 3, 2007
I read scott's tutorial for Deploying database to Hoster's server
"Recipe: Deploying a SQL Database to a Remote Hosting Environment (Part 1)"
bt cud nt upload n get the user login functinality wrking..
so plz help me..
View 1 Replies
View Related
Nov 2, 2007
I have a web app that uses two SQL Express databases. One of the databases is the membership database. I am deploying the app to a hosted environment. Here is my connection string:
<add name="Akamojo_APSNETDB" connectionString="Data Source=.SQLExpress; AttachDBFileName=|DataDirectory|Akamojo_ASPNETDB.mdf; Initial Catalog=Akamojo_ASPNETDB; Integrated Security=true; User Instance=true"/>
Here is the error that I get:
Could not open new database 'Akamojo_ASPNETDB'. CREATE DATABASE is aborted.
Cannot attach the file 'e:hostingmemberakamojoTournamentLogApp_DataAkamojo_ASPNETDB.mdf' as database 'Akamojo_ASPNETDB'.
File activation failure. The physical file name "c:inetpubwwwrootTournamentLogApp_DataAkamojo_ASPNETDB_log.LDF" may be incorrect.
The log cannot be rebuilt when the primary file is read-only.
The mdf file is not read only. In the hosted environment the database is on the E drive. In my dev environment the database is on the C drive. From the error message, it appears that when it tries to build the log file it is trying to build it on the C drive in a path that doesn't exist in the hosted environment.
Any help is greatly appreciated.
-Darrell
View 1 Replies
View Related
Jan 28, 2008
Hello,
I would like to deploy a per-machine Express database as part of my VS2005 C# desktop application. The deployment must work with both XP and Vista from the same setup files. I'm not using One-Click installation. I don't want my users to have to configure Express with the Surface Area Configuration tool.
Since the database cannot go in C:Program Files because of Vista ACL issues, I am using COMMONAPPDATACompanyNameAppName as the install path for the database and other user writable application files. In XP this expands to C:Documents and SettingsAll UsersApplication DataCompanyNameAppName and in Vista it is C:ProgramDataCompanyNameAppName. Neither of these paths have write privileges for unprivileged users, so the install program needs to change the write permissions at install time. Right now I am using SetACL ( http://setacl.sourceforge.net/ ), to do that and the install goes fine with write permissions on the companyName folder and it's children for all users.
But I can't connect to the mdf file in my COMMONAPPDATACompanyNameAppName folder. If I am the administrator/installer it works fine, but as an unprivileged user I get different errors, but mostly "Could not login user ...". For debugging, I have also tried installing the database in the "AppFolder" directory (which for my app in both Vista and XP is C:Program FilesCompanyNameAppName) and using "User Instance=true" in the connection string, and the connection is made but (at least on XP) the unprivileged user cannot write to the database because the folder lacks write privileges for that user.
I suppose one thing I could do would be to change the folder/file permissions in the AppFolder, but I am reluctant to do that because I have read that Microsoft does not guarantee that the "Compatibility" feature in Vista for the Program Files directory will be available in future releases/service packs.
So is there a way to do a simple installation/db connection for a per-machine database located in a COMMONAPPDATA path?
Thanks for your help.
View 13 Replies
View Related
Feb 8, 2006
Hi,
I am developing a application where the database needs to be deployed from the central database server which is sql server 2005, and we have only few fields and few new tables which need to be deployed into pocket pc using sql mobile from sql server 2005. We would like to design the database in sql server 2005 for mobile, which will be only structure and will be deployed into PDA using web service.
Could anyone help on the above problem?
View 1 Replies
View Related