SSIS - SharePoint - Network Path Not Found - sql-server

I'm using SSIS to upload a PDF from SSRS into a SharePoint 2010 library. When I run the package in SSDT, it uploads as intended. However, when I deploy to the SSIS Catalog and run the package using a proxy account under SQL Server Agent, I receive the following error:
Network path was not found
I have verified my proxy account can post to the SharePoint site as the permissions are set up correctly. My belief is SSIS is not even trying to authenticate with the SharePoint site (maybe trying to connect anonymously?).
The code that uploads the PDF is located below. It authenticates the user to SSRS successfully, but not to SharePoint. The path that it uploads to is a UNC path. How do I get it to authenticate to a UNC path? A thought was to map a drive but that seems like a hack and may not be as reliable.
Dim httpCon As ConnectionManager = Dts.Connections("DDM Report Server")
Dim clientConn As HttpClientConnection = New HttpClientConnection(httpCon.AcquireConnection(Nothing))
clientConn.ServerURL = Dts.Variables("$Package::DDM_ReportServer").Value.ToString() & Dts.Variables("Report_Filename").Value.ToString()
clientConn.DownloadFile(Dts.Variables("$Package::SharePoint_Delivery_Location").Value.ToString() & Dts.Variables("PDF_Name").Value.ToString(), True)

I finally figured this out yesterday. Hannover First, you were onto something. In SSIS, you use WebClient within a script task to authenticate to the SharePoint site using the URL instead of the UNC Path. WebClient has everything you need to authenticate.

Related

The network path cannot be found SSIS File System Task

I am trying to upload a File onto the Sharepoint using a File System Task. When I run the package manually, it succeeds.
However, after I deploy it and run via SQL Agent Job I get the following error:
"The network path was not found"
Can you please help?
When you run it locally you are using your windows credentials to authenticate through to the sharepoint site. A sql job will not use your windows credentials. You can setup a proxy account, but make sure it has permissions to the sharepoint site as well.

Visual Studio web and SQL publish

Here's the scenario:
MVC web project
Three MS SQL Server database projects
One of the databases must be populated with lookup tables
Other tables are user data and don't need data uploading
GoDaddy hosting
Visual Studio 2013
I'd like to deploy everything (web project, sql schemas, reference data) to GoDaddy in one fell swoop, but they appear to only offer FTP uploading. When using FTP in the Web Publishing Wizard, it says "Database preview not supported for this method" which I'm taking "method" to mean FTP. I can publish the web project fine in FTP, but of course without the databases the web application generates errors.
So here are my questions
There is a "Web Deploy" publish method listed in the wizard, but GoDaddy has no information on how to set this up. Can this be used with GoDaddy and will it publish DBs also?
How does one configure the project to use the local SQL Server when running on localhost, but when deployed it uses the GoDaddy SQL Servers?
Can the data in the local DB be uploaded as part of the publishing wizard process, or is SQL Server Management Studio the tool of choice?
Thanks!
I don't believe GoDaddy supports WebDeploy. They didn't when I left their service a few years ago. You can talk to them to confirm whether this has changed.
This is the role of Web.Config Transforms. For an intro to the topic, see here; the article is a little out of date and doesn't mention one of the most useful points - you can add transforms for each publish profile, so they're applied according to your publish settings.
You probably can't upload the local DB file. In almost every hosting situation, the SQL server and the web server are two separate machines, and don't share any files (corollary: the web server doesn't have the SQL service installed). One workaround you can try is to publish the DB directly from your own machine. That is, if you can connect to the DB from your machine, you can do a Web Deploy publish to your own machine but it will send the SQL changes to your GoDaddy DB server.
A more advanced workaround for #3:
Set up your FTP publishing settings for your files
Figure out how to publish your DB through WebDeploy only/from the command line (you can refer to here for a sample using WebDeploy from the command line; note this is going from GoDaddy -> Local, but it's trivial to turn it around)
Customize the web publish pipeline to insert an MSBuild target to execute your WebDeploy command line (see here for an example of modifying the pipeline; you can add the target directly in your .pubxml file if you're not intending to use it for multiple projects).
This will give you a single publish profile which will separately publish your files (via FTP) and your DB (via WebDeploy).

Creating SQL Server database in (or attaching from) Google Drive

I tried to create a new SQL Server database in my Google Driver folder but I cannot even navigate to my GD and when I paste in the path I keep getting acces denied even when SSMS is running as Admin.
Also tried creating the DB in usual SQL Server Data folder, moving to my Gooogle Drive and attaching from there by pasting in the path because I cannot navigate to GD when trying to attache an existing DB but again I get access denied error...
Anyway, did anyone manage to create in or attach from Google Driver folders an SQL Server database or has any idea how to achieve this?
SSMS may be running as an admin, but the service account that SQL Server is using is the one that needs access to the folder. Can you verify that is the case

error creating application to be deployed with ClickOnce within our network via FTP

I am trying to set up an application to be deployed with ClickOnce within our network via FTP. I am using C# in Visual Studio 2012 update 3. In the Publish tab of the properties of the Winform app, I have a file share specified as the "Publishing Folder Location". The "Installation Folder" is blank as well as the "Update Location" in the Application Updates page. I have the "The application is available offline as well" radio button checked although I've tried it both ways.
The error message I get is:
Error 1 Failed to connect to '\servername\shares\DATA...\MyProjectPublishFolder\' with the following error: Unable to create the Web site '\servername\shares\DATA...\MyProjectPublishFolder'. Unable to create the Web site location '\servername\shares\DATA...\MyProjectPublishFolder'. Access is denied.
This implies it is trying to set up a web site. I was wanting to deploy via FTP. I cannot see any setting where I can specify FTP.
I found:
Trying to deploy clickonce app to FTP site but getting FrontPage Server Extensions not installed Error
but that fix didn't help. Any other pointers are welcome.
Ok, I was confused, The developer can "Publish" the application using a Web Server, an FTP Server or a file path. The user can "Download" the application using a Web Server, a File Share, or Removable Media (i.e.: DVD).

Silverlight / server folder permissions

My Silverlight web site is supposed to let the client download a zip file. The zip contains two pdf files that are copied to a temp folder, plus a third pdf file created using crystal reports. On debug in my computer this is working perfectly. However, I've just published the project on a remote server and I can't download the file.
I don't know if the problem is with silverlight or the server, since I wasn't the one that configured it. When I run fiddler, it throws an 'Access to folder is denied' error.
Both me and the server Administrator already set permissions to write and read from that folder to every account of the server, and still does not work.
Can anyone help with this, I can't seem to figure if the problem is with the server or silverlight. The server is running Windows Server 2008 R2 Standard.
Thanks
Seems it has nothing to do with Silverlight.
The IIS worker process must have the rights to access this folder (mostly it's a group called {MachineName}\IIS_IUSRS).
If you're using Single Sign On/Impersonation, then the actual user as currently authenticated by the Network's (Windows) Domain Controller has to have access rights to that folder, which is not a recommended security architecture.

Resources