FQDN in SQL connection string - asp.net-mvc

We have an azure website and an azure VM
our SQL instance is on the VM.
I am trying to craft a connection string that will allow the azure site to see the SQL box
using the FQDN doesn't seem to work
any help would be greatly appreciated
Thanks

You will have to (not so wide) open a port for the SQL Server on VM. You can do this by setting an Endpoint. The good thing is that an Endpoint has a Public port (this is what Internet sees) and a Private Port (this is where the connection goes on the VM itself). Thus easily masking the default port 1433. My personal advise is that you NEVER open public port 1433 for your Server. Even in that scenario, I would advice you to use ACL on the Endpoint to only allow connections from Azure web sites in the DataCenter your web site is deployed. As stated in the last referred article, you shall not assume that traffic originating from Azure DataCentres is trustworthy, but at least you limit the attack surface for your SQL Server.
You may also evaluate using Hybrid Connections with a VM, but I never tried it.
Another side of the story is that you may want to consider using SQL Azure (sorry, Azure SQL Database) instead of maintaining own SQL Server. Then your connection will be securely established without a lot of hassle.

Related

Is it possible to access Neo4J graph database with server public ip

Is it possible to access Neo4J graph database every body.
I tried localhost and router level working fine but I want give remotely to access every one so install this neo4j in Windows server R2.
My issue is, I want to give URL with public IP address like http://MyPublicIp:7474/browser/ but browse this URL getting site can't reachable.
You need to enable listening for non-local connections. And of course the port needs to be open in your firewall.
Depending on version of neo4j you use it might be:
3.0.x (you need to do this bor http, https and bolt separately):
dbms.connector.http.address=0.0.0.0:7474
3.1.x/3.2.x:
For all connectors
dbms.connectors.default_listen_address=0.0.0.0
For single connector
dbms.connector.http.listen_address=:7474
For more see the Neo4j operations manual.

How to publish and host a MVC4 application in your domain?

I have a webdomain www.MyDomain.com and a MVC4 web application MyMVCWebApp.
First I publish the application to a local destination.
For instance: C:\TempLocation
And then I host it to my domain with a FTP-tool (FileZilla??)
The files will be hosted but I can't find the webpage.
Which url do I have to write?
http://www.MyDomain.com/MyMVCWebApp/Home/Index.chtml or something?!
Do I have change the settings in my web.config?
What do I have to do?
You can't host an application on a domain.
An application is hosted on a web server. A domain name is only a way to translate an easy to remember address like "www.google.com" to the web server ip address which looks like 173.194.66.104
It is possible to purchase a domain without a web server.
So before going further:
Check if you actually bought a domain only, or a domain with a server
Your domain should redirect to your server ip address, you can see if he is correctly configured by opening a command prompt and doing
C:\> ping www.yourdomain.com
If this is not the case you will need to update the A record of your domain, and wait for the update to be replicated on DNS server worldwird.
If you have a managed server, you should check your hosting provider website. They usually provide in depth documentation, and they all have a different way to do things. Most of the time indeed you will be able to upload your files using a FTP software such as Filezilla.
However, in order to host a MVC 4 application you need a server with
the IIS web server, which means that you need a Windows server. So if
you have a Linux server, you should contact your hosting provider
support and tell them you made a mistake during your order. (It is
possible to host a MVC 4 application on Linux, but I don't think it
is often provided on managed servers)
If you have a dedicated server you are on your own.
The URL you will have to write to access your application will depends on what you have configured in the RegisterRoutes method of the RouteConfigs.cs file.
I recommend you to watch the last video on this page to have a better overview of the possibilities.

Trying to connect ASP.NET MVC to SQL Server 2008 R2 with possible wrong connection string

Running SQL Server 2008 R2 and ASP.NET MVC 2 web application on the Virtual Server of big german hosting-provider.
I have a problem to connect to the SQL Server.
On localhost this connection string works fine:
#"Data Source=LOCAL-HP;Initial Catalog=OnlineVertrag;Integrated Security=True";
I'm using a similar connection string on the server:
#"Data Source=MYSERVER\SQLEXPRESS;Initial Catalog=OnlineVertrag;Integrated Security=True";
but nothing happens over there.
Here is my project which I am trying to connect: http://www.hotcont.eu/OnlineVertrag/Home
Based on your comments, your SQL instance on the server has a username/password combination. You cannot use the integrated security connection for a SQL Server connection requiring SQL authentication.
Using the login information provided to you by your host, you should update your connection string to the following:
Server=MYSERVER\SQLEXPRESS;Database=OnlineVertrag;User Id=myUsername;
Password=myPassword;
Taken from ConnectionStrings.com
EDIT
Ok - I think I know what you are dealing with now. You have a virutal machine hosted on a large hosting provider -> meaning that you have control over the machine itself (aka Remote Desktop Management or something?)
The SQL connection string that I provided is for use with SQL server accounts -> meaning those that you actually create within SQL server itself. The SQL connection string that you provided uses the current logged in user's user account information from Windows to connect to SQL.
So here is the disconnection between localhost and the virtual server. When you are running on localhost, I am going to assume that you are using the built in web server to Visual Studio or some equivalent. Most often, during debugging, the web application is running under the Logged in user of the machine - aka: you. You have permission to your own SQL database, thus no issue. BUT...when you deploy your web application to an IIS instance, the web application is no longer running as the logged in user, but rather the identity of the application pool that is your app is a member of. Typically this is something like NETWORKSERVICE.
You have three options available to you
Enable and use SQL user accounts for connection from your web application and your SQL server. If you choose to go this route, you will need to use the connection string I provided above.
Login to your SQL server and add the identity of your application pool to the Allowed Users of SQL server and your database.
Change your application pool's identity to an actual user account on the server (BAD IDEA)
Most web applications go with the first option as it allows you do a few things such as create a distinct SQL user for each application that you host and as well as you can explicitly define permissions for the SQL user to each database that it may need access to (for instance, do not allow the SQL user to DROP tables).
EDIT 2
The way you are trying to connect sounds like it should be using the Shared Memory Protocol, but it might be trying to connect over TCP/IP. I forgot this earlier, but most installs of SQL are not setup to listen on the TCP/IP interface on first install. To check your configuration, click the start button (or orb or whatever Microsoft calls that now) -> All Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager. This will open a new window with some options on the left hand side. Click the SQL Server Network Configuration. Ensure that TCP/IP and Shared Memory is set to enabled. If a 64 bit install, you should probably do this for both the SQL Server Network Configuration (32 bit) and the SQL Server Network Configuration
http://msdn.microsoft.com/en-us/library/ms191294.aspx
Try this
Data Source=MYSERVER\SQLEXPRESS;Initial Catalog=OnlineVertrag;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False
I hope this works for you.

SharePoint 2007: Single Sign-on Anomaly

I have a Virtual Machine running the following:
Windows Server 2008
SharePoint 2007
SP1 Exchange 2007
Dynamics Axapta 2009
I have started the Single Sign On Service and configured it properly. Central Administration is running on HTTPS bound to a specific IP address as a new site in IIS. When I click on the link to manage the server in Central Administration for Single Sign On it keeps redirecting to localhost even when typing the complete Uri in the Address bar. Any idea what is causing this behaviour and how to get around it?
I need to configure this for BDC connections.
After a lot of research it turns out that there is no solution or explanation for this happening. I have since rebuilt the virtual environment and configured SSO before creating the SSL sites and doing the IP binding.

How can I access SQL server using ADO through a proxy?

I have a Delphi application that uses ADO to connect to a SQL server hosted on the Internet. The user running this application wants to access the SQL server through a proxy internally. How can this be done?
There is nothing special that needs to be done in the actual application, this is a networking problem, you would have to open some ports (1433 is the default) on the firewall for the communications to go through (going out)

Resources