Cannot connect to SQL database (hosting from home) - sql-server

I recently installed Windows Server 2012 and IIS because I wanted to host website from home (inside my network).
I was easily able to host simple static site, but now when I want to deploy ASP.NET site which uses a SQL Server database I have problems.
From this tutorial I "published" site from Visual Studio
http: //youtu.be/DQgbOIjWgBs?t=6m
And here is what error I get:
http://i62.tinypic.com/j9uhjt.jpg
I have installed SQL Server Management Studio and attached database to it, in IIS I have set/up database name and server, so I believe that is also ok.
Firewall is disabled (just for now until I get it working).
Here is SQL Server set-up from IIS
http://i61.tinypic.com/ao2r95.jpg
I don't know where the problem is, maybe in permissions? (I can normally view static page, website folder is located in inetpub folder)

Related

Hosting ASP.NET Web site using IIS7 Windows 7

I have made a small ASP.NET web site using VB 2010 and SQL 2008.
But I don't know how to host it on local PC.
The target PC is running windows 8.
All other PC's are connected it through LAN
The system is offline.
But before trying to host my web site on target PC (Windows 8) i want to make sure everything is ok with my site.
Hence I am first trying to host it on my PC (Windows 7).
I don't know anything about hosting on Windows 8 OS.
But I tried little bit on Windows 7 OS.
All I know is I am going to host my site on IIS7.
I already enabled IIS7 on my PC (Windows 7).
And I pasted all contents in my project folder to C:\inetpub\wwwroot
My default page is C:\inetpub\wwwroot\index.aspx
Now how do I add my website to IIS7 and attach database to it.
Do I need to install VB 2010 and SQL 2008 on target PC (Windows 8)?
Thank you.
Where is the database supposed to live in the end? If it is on the Target PC then yes it will need SQL 2008 but not if there is another server that is going to be the database server. You aren't clear about whether the site is supposed to all run on one server or if you have a multi-server set up where there is a web server and a separate database server.
Which version of the .Net Framework does the site use and is that registered with IIS?
Those would be my initial questions as you shouldn't have to install VB 2010 but you would need the Framework to be installed and configured to have this work.
EDIT: You will have to install and configure SQL Server 2008 on the machine. IIS can use .Net 2.0 or 4.0 and thus be aware of what configuration you want to run so that you don't wind up having issues.

Publish an ASP.NET-MVC in MS server 2003

I made a WEB app using ASP.NET-MVC with a local SQL server database. I have a lot of issues while trying to publish it.
I want to publish the web app on a MS 2003 server. I have tried to do it with the Publish tool on Visual Studio 2012 but it doesn't work, I had this error : ERROR_DESTINATION_NOT_REACHABLE, I searched for some solutions on the internet and found this :
Diagnosis - Web Management Service or Remote Agent is not installed or
unreachable on the remote computer. Resolution - Verify that Remote
Agent Service or Web Management Service are started on the remote
computer, depending on which one you are connecting to. You can do a
"net start wmsvc & net start msdepsvc" on the remote computer to
ensure these services are started. Also, ensure that a firewall is not
interrupting communications with the destination.
I have tried to install the Remote agent service on the MS server but it doesn't show up in the services lists.
I have also tried to publish the app locally using IIS (instead of running the app with the play button on VS studio), I have followed some steps in a forum and publish the package, I had this error :
My files are structured like that :
Can anyone help, I am really stuck on this and I can't move on !
On the server I have :
Windows server 2003
IIS 6.0
SQL Express 2005
On the development machine :
Windows 7
Visual studio 2012
IIS 7.0
ASP.NET-MVC 4
Sql Server 2008
Any help is needed, thanks.
I have found the solution thanks to this post.
I had some problems with the assemblies so I did Just do Copy Local = true in the properties for the assembly(System.Web.Http.WebHost) and then did a redeploy, it works fine.

Cube Deployment failed in BIDS

So I've been doing a project at my university with BIDS and a database on their servers. I've managed to back up the database and put it on my local machine.
Problem right now is I've installed SQL Server 2008 + BIDS through SQL Server 2008 Express Edition. Now I've heard it doesn't include SQL Server Analysis Service, meaning I can't deploy the cube.
I've tried deploying the project on my home computer but it gives me the error.
Error 23 The project could not be deployed to the 'my computer
name\SQLEXPRESS' server because of the following connectivity problems :
A connection cannot be made to redirector. Ensure that 'SQL Browser' service
is running. To verify or update the name of the target server, right-click on
the project in Solution Explorer, select Project Properties, click on the
Deployment tab, and then enter the name of the server.
I've checked and SQL browser service is definitely running so I'm not sure what else to try. Is there any way for me to successfully deploy the cube?
I think its authentication issue for your current user connecting to SQLEXPRESS. Try using "Runas /user:[domain]\[user] "Path to BIDS" to run BIDS as privileged user and try windows authentication.

How to set up Database for ASP.NET MVC Application

I created an data driven ASP.NET MVC Application locally and it works fine. Within my App_Data Folder of my project i see two databases: ASPNETDB.mdf and myProjectDatabase.mdf.
I uploaded my project files an the webserver, so that I can actually open the website. But I couldn't figure out how to connect my Database that I created locally to that website. My Website uses Authentication so that it is necessary that a user logs in/registers. But because the database is not connected this obviously doesn't work, because the application needs a database to save and retrieve user information.
I'm using Visual Studio 2010 Express and downloaded Microsoft SQL Server Management Studio as well to work with my database. With Microsoft SQL Server Management Studio I already connected to my database with the login information my provider gave me. But how can I import my local databases? Do I need to import ASPNETDB.mdf as well, because that is where the user information are stored?
I would be very thankful for help
What version of SQL Server do you have on your production server? SQL Server Express can attach to those local MDF files. If you're using SQL Server Standard, you'll need to attach them to the SQL Process.
Also, the ASPNETDB.MDB file is the authentication database that is automatically created in your MVC project. That is the DB that stores usernames and passwords, so yes, you will need to move that database over as well.

deploy SQL Server Express database with desktop app?

I've created my first database based desktop app in .NET and not able to understand how can I deploy the database with the application installer, so that the database, application and the SQL Server is installed in one go.
If I only deploy the native client for SQL Server and the database with the installer, will it work?
The application uses the database very frequently.
You need to install the SQL Express engine if you want to use it. Deploying only the client connectivity will give you exactly what the 'client connectivity' name implies: you'll be able to connect to a SQL Server. But only a running SQL Server instance will be able to read/write your application database.
The SQL Express install MSI is actually very customizable and allows for a lot of scenarios, including unattended setup and remote deployment. For the most basic options, see Configuring SQL Express During Installation. Your application installer will have to invoke the Express installer passing in the desired parameters.
Using click once you can make sql server express a dependency of the main project and it would be deployed with the instalation data and installed, if it is not instaled yet, when you first install your app.
You can do it in the project properties, in Visual Studio.

Resources