I tried to set-up the SQL tables for ASP .net 2.0 membership provider by clicking on ASP.net Configuration under Project.
I have completely uninstalled SQL 2005 Express and installed SQL 2008 Express instead.
It seems like that it can not connect to the database.
Does anybody know how to get this fixed so I can use 2008 instead ?
Try to configuring the database typing "aspnet_regsql" on the VS command prompt.
Then setup the database and finally change de connection string on the web.config file.
ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe)
What is your SQL 2008 installation instance called? What does your connection string for the membership provider look like?
As far as I know, there is (or was) a glitch in the SQL Server 2008 Express installation that even if you chose to install as "default" instance, it would still make it a "named instance" called ".\SQLExpress" instead. Could that be the problem?
Marc
As Marc already has pointed out, it could be the problem with the instance name. This is fixed in service pack 1 for SQL Server 2008 Express. For more information and a workaround, see this Microsoft KB article.
SQL 2005 and 2008 are both configured in a fairly locked down state by default - and this means that SQL won't accept access the database other than through Shared Memory, even with Integrated Security.
You need to enable TCP/IP or Named Pipes for the Client Protocols for the server (as this is how ASP.NET talks to SQL if you've not configured a DSN to use Shared Memory.
I can't remember the exact steps in 2k8, as I've only had to do it once, but in 2k5 you had to open the SQL Server Configuration Manager, select SQL Native Client Configuration, Client Protocols, and enable TCP/IP and Named Pipes - it's a similar process for 2k8 as I recall.
The connectionStringName used in the membership Tag should be changed to the present connection string where you have the membership tables created.
If the connectionStringName is not pointing to a valid connection String name in the connectionStrings tag, the membership tables can not be used by the application.
Related
I have a situation where a classic ASP's SQL Server database has been moved from a server 2003 to a 2008r2. The classic asp application stills resides on a server 2003.
Now because I have never done a migrating the only thing I thought I needed to change is the SQL Server named IP address in the application's IIS deployed ini file. Currently I am using anonymous authentication and the default application pool. The application render's to the browser fine. The problem is the application is not pulling any data for the database.
It seems that I have missed something in the configuration process. Has someone done this type of migration and if so provide me a list of thing that they have done to configure the application correct and other settings for the migration?
Thanks,
Steve Holdorf
This is not an asp but a database authentication.
It sounds like you used Windows authentication to connect from asp to the old server. Windows authentication means that asp uses IIS user identity to connect to the database and in your ini-file (or asp files) you do not provide any user/password to connect to sql.
If you want to keep this type of authentication for the new database, then you would need to configure user on the new Sql Server. Look at the old server, you should find the user named similar to domainName\WebServerMachineName$. You would need to create the same user on the new Sql Server and grant the same rights as on the old database. Read more https://msdn.microsoft.com/en-us/library/ff647396.aspx
If this is not an issue, then you should find what is the error message when application is not pulling any data for the database.
I have followed through a tutorial using a "Code First" approach with Entity framework. It seems like Visual Studio was smart enough to create the database for me and setup the tables and everything based on my classes. I have a question about the database that was created.
I notice that the database was automatically set up and I could see it in my Server Explorer window in Visual Studio. In my Web.config, under the connection string, I see Data Source=(localdb)\v11.0;.... There is also a .mdf file created in a folder called App_Data.
My question is:
Was Entity framework using MS SQL Server or SQL Express for the database it has created?
If it wasn't using MS SQL Server or SQL Express, what was the database that Entity used?
I don't remember installing SQL Server or SQL Express. Does installing Visual Studio automatically install MS SQL Server or SQL Server Express?
PS: I will appreciate if you can help me to clear up my doubts. Coming from a PHP background, I'm very new to .NET and its ecosystem.
The connection string indicate that you are using SQL Server Local DB.
With Microsoft SQL Server 2012, Microsoft has introduced a feature called LocalDB which is a new edition of SQL Express. LocalDB is created specifically for developers and it is much easier to install (no service) and manage than standard editions. Developers initiate a connection by using a special connection string. It supports AttachDbFileName property, which allows you to specify a database file location.
When connecting, the server is automatically created and started, enabling the application to use the database without complex configuration tasks. This edition uses the same sqlservr.exe as the regular SQL Express and other editions of SQL Server.
http://msdn.microsoft.com/en-US/evalcenter/dn434042.aspx
http://technet.microsoft.com/en-us/library/hh212961.aspx
As the title says, I used to have SQL Express 2008 on my machine. After creating a new Web application, Visual Studio would automatically create the aspnetdb.mdf database and add a connection string to the Web.config file.
Since installing the full version I've found, to my surprise, that it's not possible to reference a local .mdf database any more. Firstly, is that true?
With that in mind, I used aspnet_regsql.exe to create an aspnetdb.dbo database on my local server. I then used the 'Server Explorer', in VisualStudio, to attach that database to the 'Data Connections'.
The problem is, every time I create a new web application, it sticks a local SQLExpress connection string into the project template.
Is there something else I have to do to rectify this?
Thanks
As I'm learning the ins and outs of ASP.NET user management, I've learned that the default in VS is for it to use a SQL Server Express .mdf file for the data it needs to save. This won't help me for when I deploy my site, as I'm running SQL Server 2008 R2 on my IIS 7.5 server. I know that I can run a command line tool to automatically create the db tables necessary for user management, and will do that on my development machine, but how do I tell my existing, in development code in VS to ignore the existing Express .mdf file and look at the newly created db tables?
Simply update your Web.Config to set up the role provider and the database connection string:
http://weblogs.asp.net/scottgu/archive/2006/11/20/common-gotcha-don-t-forget-to-clear-when-adding-providers.aspx
http://www.codersbarn.com/post/2008/02/24/ASPNET-20-Guest-Book-Admin-Part-II.aspx
Also, Scott Mitchell's Membership and Roles tutorial series is the most comprehensive I've seen:
http://weblogs.asp.net/scottgu/archive/2006/05/07/ASP.NET-2.0-Membership-and-Roles-Tutorial-Series.aspx
I'm deploying a small ASP.NET (framework 3.5) application in a Windows Server Web 2008 32 bits, IIS 7. The applications needs connection to an Oracle DB in another Server, using the tradicional DataAdapter, Oracle Connection, etc.
I´ve installed correctly the Oracle Client in the server (the server is another server´s client) and I´ve checked that this server has access to the server where the database is.
Even though my app isn´t able to connect to DataBase. The message says that Oracle components haven´t been found. It doesn´t find the OleDB Provider for Oracle or some dll.
¿Something I shluod know about permissions of the ASP.NEt users or something like this?
Some idea??
Thanks in advance.
Gus.
Check the path. It could be that the Oracle client directory is not on the path of the account that runs your ASPNET app.
Actually there are other steps you can go through, to verify the Oracle client install.
This article is old but may be helpful.