Running in DTS in Deployed ASP.net - asp.net

I have created a web application that runs a DTS remotely from a sql server 2000.
I made it worked in the visual studio environment but when i deploy it,
it doesn't work and the error message says :
DataPump_Task Failed.
I am not sure about my findings but...
does the problem has something to do with my IIS settings?
I am running IIS 7 on windows 7.
Thanks for your help.

When you execute a DTS Package from an ASP page, the package executes in the security context of the Web site visitor, which may be that of the Windows user (if the web site is configured for Basic or NT Authentication) or of the Anonymous account.
The package does not execute in the security context of the user ID supplied to load the package from SQL Server. Therefore, it is important to make sure that the account executing the package has appropriate Windows permissions to all resources that the package may use, such as disk files, DLLs, or other drivers (for import/export operations) especially when the Web site is configured for Anonymous access.
If a package works in the DTS designer and works from other client applications, but fails from Web applications, troubleshooting should begin with permissions issues.
For additional information about determining which Windows account will be used to execute the DTS package, see this article http://support.microsoft.com/kb/269074/EN-US

Related

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

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.

Master Data Services Web Application Issue

I am trying to create a Master Data Service Web Application. So far, I have not succeeded with this activity.
I have check on internet for possible solutions but:
The .NET 3.5 and 4.5 features are checked, the svc file is present, but everytime I run the Master Data Configuration Manager I see the the warning about Internet Information Services.
I do not what else do I need to install or configure. When I try to access the URI of the web application, this does not show anything.
I am using Windows 8 and Sql Server 2014
When this happened to me I discovered I needed to execute the MDS Configuration Manager on the virtual machine's operating system rather than my local machine.
These IIS settings exist on that Windows Server, not your local machine.

Connecting to a COM interface in an aspx code-behind running on IIS?

I've created a Windows service (an exe based on the Visual Studio ATL wizard) which exposes a COM interface. No problems running as an in-proc server or a Windows service. I need a Windows service since I need some processes to be available outside of IIS access.
I've been creating some web pages (aspx/C#) calling my service and everything has worked fine testing within the Visual Studio .NET Development Server. Now, I'm trying to push the web pages to IIS 7 (running on windows 7) for further testing. But, when the pages are running under IIS the calls to my COM interface all fail with the error
"Retrieving the COM class factory for component failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))."
I've verified the service is:
registered with Windows under HKCR\Clsid\ (note, I registered running "myservice.exe /RegServer" since regsvr32.exe only works with dll's)
myservice.exe has read and execute rights for the IIS_IUSRS user
is a 64bit exe (so should load in the default IIS app-pool space)
Works great in .NET Developement Server debugger (but not IIS)
Any ideas why this would not work? Something to do with the COM interfaces contained in an exe vs dll?
Any possibilites of IIS calling a COM interface exposed in a Windows service?
I believe you need to grant access to your site's app pool process to use your COM object, under DCOM Config.
Go to the Component Services
> Computers > My Computer > DCOM Config branch
Locate the AppID or Name of your service in the list. Right-Click on it and select properties.
Open the Security tab
Pick Launch and Activation Permissions and select Customize.
Grant the app pool process (probably ASPNET, but check the IIS app pool properties for your site) the following: Local Launch and Local Activation.
Please let us know if this solves your problem.
Incidentally:
> is a 64bit exe (so should load in the default IIS app-pool space)
That's not quite true. The app pool is an ISS-controlled process. Your service runs on its own separate process no matter what. So your service has nothing to do with IIS app pools.
It looks very much like a security/permissions problem - so first make sure that whatever user the IIS worker is running under has sufficient rights and in particular check that your ASPNET group has permission to use COM (I think it doesn't by default).
EDIT - after posting that, I did find another post that might help - take a look here too
Thanks Guys. I really appreciate your responses. Your information pointed me in the right direction. The problem was indeed a security\permissions issue. To compound the problem, whenever I rebuilt my service, the rights I set for IIS_IUSRS was purged from the exe so some of the failures I was seeing was due to simple rights on the service.exe. So if you start seeing intermitent errors access your COM object during development then check the rights on your exe after re-builds! I hope that helps others.
For completion, here's how I resolved the issue:
changed the 'identity' of my services application pool to 'LocalSystem' (since my COM was in a Windows service running under the system account - most people will not require this level) (IIS Manager | Application Pools | right-click on your app pool | Advanced Settings | Identity

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

NAntContrib/NAnt mkiisdir fails on IIS 7.0 / windows 2008

I'm trying to use NAnt/NAntContrib build script to build a web application on Windows 2008 (IIS 7.0).
In the build file, there is mkiisdir task, which fails with:
[mkiisdir] The webservice at 'localhost' does not exist or is not reachable.
All the documents/posts I found so far (non for w2k8, only Vista) say to install IIS 6 Compatibility services (all of them, including scripting tools, etc.) So I did, but it still throws this error.
Any idea what else need to be changes, so NAnt be able to create/delete virtual directories on IIS 7.0?
EDIT: New data - when I log in as local administrator to this server, the nant task succeeds, but it fails when I log in as a domain admin. I have added the domain admins group in the local Administrators group, but it still fails. Any idea what other permissions I need to check/change in order to make my domain admin user to be able to execute this task? I can create manually virtual folders without any problems.
In order to get iis nantcontrib tasks to work you need to install IIS6 Management Compatibility Tools. Here is the blog describing how to do it in Vista:
http://thoughtworker.in/2008/01/15/nant-the-webservice-at-localhost-does-not-exist-or-is-not-reachable/
Here is a screenshot of how to do it in Windows Server 2008:
alt text http://img407.imageshack.us/img407/699/iis6tools.png
To answer my own question - I have isolated the part of the code in NantContrib which was causing the problem, and made a sample application to test.
I have posted this as a separate question here, and there is the solution as well.
Cheers

Resources