Web Platform installer and sql express database setup - asp.net

I tried to install Amplifeeder today with the Web Platform Installer.
When I arrived at the database setup I had to fill out some informations like "db admin user/password" and user username/password.
Using SQL Express I do not have any username/password (neither admin or user). How should I be able to install applications with the WPI and SQL Express 2008 ?
Basically I had this error while trying to install in the logs :
DownloadManager Error: 0 : MS Deploy exception: Microsoft.Web.Deployment.DeploymentClientServerException: The database 'AmpliFeederDB' could not be created. ---> System.Data.SqlClient.SqlException: Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.

I finally achieved this by command line and reg fixes.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQLServer
LoginMode must be 2
restart SQL Server Express service.
Then :
In command line :
sqlcmd -E -S .\SQLEXPRESS (will login with windows authentication mode)
1) ALTER LOGIN sa WITH PASSWORD = '<new_password>'
2) GO
1) ALTER LOGIN sa ENABLE
2) GO
It should do the trick to install the applications after.

As far as I know the only way I could make it work was by using the command line utility 'WebPICmd.exe' located in the application folder.
You do need a strong password because it uses a regular expression to verify.
All seemed OK, I was able to access the DB thru OSQL and also Management Studio, had no problems with logons, had both authentications enabled, TCP/IP and named pipes. yet nothing worked... It seems to be some kind of a bug....
Thry it like his:
WebPICmd.exe /Install /Application:"Joomla"

When you install SQL Server Express for the first time, you would have had option to select authentication mode, where you would select MIXED mode authentication and provide admin authentication details.

Well, the SQL Server Management Studio Express provides a more sustainable solution. See this link, without having to fiddle with registry keys & running commands:
http://www.knowledgesutra.com/forums/topic/61695-resolving-cant-login-to-sqlexpress-using-sa-account/

Related

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion', when it *is* present in aspnetdb

I have a web site that works as it should on our company intranet, which I am now trying to deploy on a hosted web server. Unfortunately when a user clicks Log In it crashes with:-
Server Error in '/' Application. Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
If I go on to the remote server's desktop, log in to Management Studio with the username and password in the site's webconfig.cfg file, then I can open the aspnetdb database, and execute dbo.aspnet_CheckSchemaVersion without any error messages or access issues.
I have read numerous other postings on this error message and none of the suggestions have helped, but I am new to web site administration and may be missing something obvious.
The web site is coded in VB.NET, and compiled with Visual Studio 2012. Third party tools used are Fusion Charts and AJAX Calendar Extender. The .NET Framework version is 4.5.
The remote server runs Windows Web Server 2008 R2 with IIS version 7.
The database server is a named instance of SQL Server Express 2008 R2.
There are five users defined in the aspnet_Users table, which I added using the .NET Users applet within IIS. I can no longer use the user management tools in IIS because I had to upgrade the site's application pool to .NET 4.0 which does not support them. However I can see the users are there.
There are no Roles defined in aspnetdb.
Does anyone have any ideas what I could be missing?
Try recreating the ASP.net procedures with something like:
aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
Just so this question is no longer "unanswered", I will echo Aaron Bertrand's comment, which the questioner said was the correct answer:
Does your connection string specify the database? If not, then perhaps the application is trying to execute that stored procedure in the login's default database, not the aspnet database. – Aaron Bertrand Feb 17 at 14:44
Thanks very much that was it. I changed the "Initial Catalog" in the connection string to aspnetdb, now I can log in. – user3319440 Feb 17 at 16:30

Oracle 11g configuration with Enterprise manager on windows 2008 standard R2

I am trying to install Oracle 11g on windows 2008 standard server R2 (as standalone). I get successful installation as I can connect to sqlplus. But when I try to run the "Enterprise manager" through the EM url on https I see a login page...I try to enter "SYS" then password then select role as SysDBA" and then I get the following error.
"Internal Error has occurred. Check the log file for details."
I have been searching forums like crazy since last one week and tried all solutions but no luck. Can anyone guide me here how to overcome this issue.
I faced the same problem, the following command solved it:
emca -config dbcontrol db -repos recreate -ORACLE_HOSTNAME hostname -SID orcl -PORT 1521 -ORACLE_HOME $ORACLE_HOME -DBDNMP_PWD sys
Check before login to Oracle 11g Admin Page.
Check that all the windows related to Oracle must be closed.
After this, restart the services and try to login.

The configuration option 'user instances enabled' does not exist?

I'm using SQL Server 2008 R2 for Window 8
When I built my webpage, sql server suddently stop and show an error :"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. "
Try to fix that problem by searching google. As recommended, I have to delete the folder C:\Users\User\AppData\Local\Microsoft\Microsoft SQL Server Data, but there is no folder with that path
Try another way,I run the below code in SQL Query window:
exec sp_configure 'user instances enabled', 1.
Go
Reconfigure
But it has an error: The configuration option 'user instances enabled' does not exist, or it may be an advanced option.
Help!!! Which way is the better one??? And How can I fix this:Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
You can try this:
Stop all user instance processes of SQL Server running under your local account (open up task manager and look for sqlsrv.exe process and end it)
Delete all files in the %LOCALAPPDATA%\Microsoft\Microsoft SQL Server Data\SQLEXPRESS folder
All be aware that if you are using XP the location will be something like
C:\Documents and Settings\\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
F5 again
The problem is known issue. SQL Express cannot create a user instance using the set of engine files in your local app data folder, deleting them should allow sql server to recreate them with the correct credentials for you to F5 successfully.
I believe you may not be having SQLExpress installed as directories does not exist. In that case you will need to reinstall the version of SQL Express that was included in the project.

Aspnet conguration connection test fail after correct configuration

I am building web form using VS2012Express edition. I am trying to implement SqlMembership provider. i did the congfiguration and all the neccessary objects are install.i can see the aspnetdb on my db server with all the objects.But when i try to create new user by goin to Project and ASPNET Configuration then Provider tab. i click the test connect and receive this error.Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
I have done what this error message is telling and have look at several samples on MSDN site. Could the problem be because i have both VS2010 Profession and VS2012 Express installed on my machine or am doing something wrong somewhere?
here is my webconfig.

How do I grant access to my SQL Server Express database to a specific user with Visual Studio 2008 tools?

I'm trying to access an SQL Server Express database out of an ASP.NET HTTP request handler.
The handler is run under ASPNET account and uses "integrated security" in the SQL connection string and so I get an error message saying that login for ASPNET account failed and so I can't access the database.
This seems to be a very common problem and most answers say "grant access to you database to user ASPNET".
I only have Visual Studio 2008 and I can't find how to change access permisssions for a database. Specifically I use Tools->Server Explorer and I can see all the tables in the database but can't find how to change access permissions.
How do I change access permissions to my database using tools shipped within Visual Studio 2008?
One option is getting the tools for SQL Express would be a good idea—thus getting SQL Server Management Console Express Edition, or just install the SQL Server Management tools (eg. from SQL Server Developer Edition). Then you have the full GUI (including ability to enter and generate SQL).
The other option is to use SQL to do it:
Use CREATE LOGIN to add the login to the SQL Server instance.
Use CREATE USER to add login to the target database.
Use SP sp_addrolemember to assign roles.
Eg. (IIS AppPools is a group of App Pool Identities on system Dev1 being assigned generic read and write data access to the current database):
CREATE LOGIN [DEV1\IIS AppPools] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
CREATE USER [DEV1\IIS AppPools] FOR LOGIN [DEV1\IIS AppPools]
GO
EXEC sp_addrolemember N'db_datareader', N'DEV1\IIS AppPools'
GO
EXEC sp_addrolemember N'db_datawriter', N'DEV1\IIS AppPools'
GO

Resources