ASP.NET (macOS) - Send Windows Credentials in SQL Connection - asp.net

I'm a contractor working remotely on a legacy ASP.NET application. I'm struggling to stand up a local instance of the project due to the error SQL Exception - SQL Server does not exist or access denied. I suspect this is because of the use of Windows Authentication for the SQL databases backing the project.
Before I launch into a lot more detail I'll ask my question: what are my options to pass Windows credentials to an SQL server in an ASP.NET project built on OSX?
I believe I've proven this is possible with some steps I'll detail below, but the actual implementation in an ASP.NET project is escaping me due to my inexperience with everything .NET, and the many-fold differences between my setup and the typical dev.
Standard Dev Setup
The devs I'm working alongside are using Windows machines housed in their corporate domain, running Visual Studio 2012. Because they're already logged into their machines with the appropriate credentials, the use of Integrated Security=SSPI in the SQL connection string "just works".
My Setup
I'm running a Mac Mini outside of their corporate domain, and using Visual Studio in conjunction with Mono to support the .NET Framework-based project. Passing the SSPI option won't work out of the box because I'm not connected to any Active Directory. That said, I do have valid credentials to log into their network.
What's worked so far
I've proven that a connection to their network resources is possible:
When logged into a virtual Windows machine, I can connect to a shared drive on that network with the credentials I was provided.
I then set up that same shared drive on my Mac Mini with those same credentials.
Using SQL Pro for MSSQL, I was able to connect to the desired database using my credentials.
As I understand it, what I'm looking for can be accomplished on Windows with Credential Manager, so bottom line I think I'm looking for the equivalent solution on OSX that plays nicely with ASP.NET project as compiled by Visual Studio.

Related

Deploy ACCESS OleDb driver

I've tried to deploy a small website (ASP.NET) which is using an MS ACCESS 2010 db. Deploying the website on the server I get the following error:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Connectionstring used : Provider=Microsoft.ACE.OLEDB.12.0; Data Source=path-to-db
MS Office is not installed on the server and neither is the Access Database engine. The website is runnin in a shared hosting environment, so I am not able to install office on that server, so may I somehow deploy the provider by dll's?
Is it possible to deploy the drivers needed for ASP.Net to connect to the database without having to run an installation on the server. As this is in a shared hosting environment, I am not able to install anything. Only fileupload by ftp.
Open IIS, navigate to Application Pools, find the appPool for your website, right click, advanced settings, set "Enable 32-Bit Applications" to true.
Looking around, this has nothing to do with Office. If you're only using Access as the database, then you don't need to install it. Info here: http://www.mytechsupport.ca/forums/index.php?topic=11237.0
I found this StackOverflow thread with the same error you did so it sounds like it might be the same issue. Microsoft.ACE.OLEDB.12.0 provider is not registered
If its running windows then look through that thread and see if the 64-bit issue is the problem. I've had this same issue before and its apparently quite common. You may need to e-mail whoever for support on your server.
Is it running Linux? If it is running linux then the issue might be just an entire lack of the driver to connect to Access databases. If this is the case I would e-mail your support and ask them if they can install the proper drivers for you. Info here: http://nixcraft.com/databases-servers/11878-connect-microsoft-access-database-php-linux-server.html

visual studio asp.net project requiring password if started over rdp

If I connect to my development machine via RDP and work with an asp.net solution, I have to enter my username and password for opening the projects web site (from within the rdp session). If I do the same localy on the development machine, no password is required.
The only solution to avoid this strange behaviour, is to deactivate NTLM-authentication in the project start options.
What is the reason for this strange behaviour? What is the difference when I use VS2010 in remote session instead of a local session?

Need help setting up dev environment

I'm working on different windows machines and virtual windows machines on a mac. I have a project wich uses SQL server and AD for autentication.
Right now I have to be connected to VPN so that the asp.net web application can connect to AD using LDAP string to autentivate users, I also have the SQL server on the other side of the VPN connection.
Is there any way to setup my enviroment so that I can work locally without the AD, and on a local SQL server and be able to publish the project without manually changing the web.config file?
You can make some publish profiles, they affect your web.config automatically when you select the profile.
Seen Here
Hope I can help you a bit !

OleDB Provider for Oracle not found in in Windows Server 2008 with IIS 7

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.

How to access ASP.NET App Over a Network Using IP Address

My asp.net web app is hosted on this URL on my local machine:
http://localhost:45433/
I want to access the same application from a different computer on the network. I tried replacing the localhost with my IP but it did not work.
any ideas!
UPDATE 1:
Now, I am getting this error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
If your application is hosted using Visual Studio's built in web development server then this server does not allow remote connections. It is for testing purposes only and accepts connections only from localhost. In order to access your application from remote clients you might need to deploy it to IIS.
First, add the application as a virtual in IIS, and as long as you can access the machine on the network, you can do:
http://<machine name>/<virtual>
I do that at work, where I can access my co-worker's web site.
HTH.
That looks a lot like a url used by the development web server in visual studio. That web server only responds to requests from the localhost. It won't work for other requests from other machines on your network.
You need to install IIS on your machine (must be a Pro version of Windows) and deploy to that IIS install to share your app on the network.
I don't think the built-in version of Cassini (VS debug server) allows remote connections.
However, the UltiDev version, built off of the same code base with a few enhancements, does, and is a much lighter-weight install than IIS (especially if you can't find your OS install DVD). It also integrates nicely with Visual Studio for debugging purposes.

Resources