FTP in to server from Visual Studio 2012 to Webhostingpad - encryption

In Visual Studio I click File > Open Web Site... > FTP Site
While entering all of the credentials I do notice that at the bottom of the form it says "Passwords are sent across the network in plaintext (unencrypted text), making them vulnerable to interception"
Once I click okay I then get an error window that ultimately states "Sorry, cleartext sessions are not accepted on this server (421)"
Is there any way I can get VS to start an encrypted session? If not, what should I use? I really don't feel like having to save in Visual Studio then copying over the specific files via another FTP client if I don't have to.

Related

Failed to map the path '/' Visual Studio 2013 IDE (Even as administrator)

I use to be able to connect to my Test Server source code via a Network Drive.
I have mapped it to letter K.
My computer (since last restart) won't run the IDE properly, and always displays the error ASP.NET runtime error: Failed to map the path '/'. at the top of the .aspx file.
I have tried the following:
Starting Visual Studio as administrator
Ensuring that my user has FULL rights to the source code folder (both from the network drive and the server)
Given Network Service and Network users on the server full control over the test server source code folder.
Changing the AppPool identity on the test server to use my username (as I am administrator on the server as well).
Creating a new website project and mapping it on another network drive (Still doesn't resolve the problem).
When I access the test server via my web browser I receive no errors. So I know there is no errors in my code.
If I open the IDE on the server using remote desktop then it works with no errors.
I can live with the error on the top of the page, however when I try to access a DataSet or a Control on the page then it doesn't register the control or function as an existing function.
I am now at a complete loss as to how I am going to fix this.
Any ideas on what could cause this issue and how I could fix it?
I found a work around to the problem by opening the code directly using the IIS on the server.
What I did was click on File -> Open Website, in the open dialog, on the left, I clicked "Local IIS", found my TestServer and clicked open.

Excel workbook.saveas inside IIS

I have a problem when I published web application in IIS
sometimes the WorkBook.SaveAs method works fine, sometimes not.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Source Error:
workbook.Saved = True
workbook.SaveAs(Server.MapPath("~/MyFolder/Excel.xlsx"))
workbook.Close()
APP.Quit()
and sometimes the error is on APP.Quit
Well the first thing to note, is that office interop is not supported server side by Microsoft, due to both licensing and stability/reliability issues:
Microsoft does not currently recommend, and does not support,
Automation of Microsoft Office applications from any unattended,
non-interactive client application or component (including ASP,
ASP.NET, DCOM, and NT Services), because Office may exhibit unstable
behavior and/or deadlock when Office is run in this environment.
Still, many people do this/try to do this, and run into similar problems as you did. Generally this appears to be caused by permission issues (security context and the DCOM security configuration). For which different potential solutions have been described, such as
How to make IIS7 play nice with Office Interop With a 2 different solutions, one of which is mentioned several times elsewhere:
Open Windows Explorer
Depending on whether you installed a 32bit or
64bit version of office you will need to do one (or both) of the
following:
32bit Office installation: Navigate to
C:\Windows\System32\config\systemprofile
64bit Office installation:
Navigate to C:\Windows\SysWOW64\config\systemprofile
Verify the folder
"Desktop" exists (create it if it's not there)
Right click > Properties
On the security tab: Add the account under which the site
is running (eg: Network Service) with default permissions (Read &
execute; List folder contents; Read)
RPC failure opening an excel document. Listing the following solution:
Type Dcomcnfg.exe in Run which opens the dcomconfig utility.
In the dcomconfig utility,
go to Component Services --> Computers --> My Computer --> DCom Config
--> Microsoft Excel Application (and Powerpoint)
Right click it and go to properties. Go to security tab. Under
Security
1) Launch & Activation Permissions --> Choose customise and click
Edit. Add User Network Service and check everything under Allow for
it.
2) Do the same for Access Permissions and Configuration Permissions.
Then click Apply and close everything.
Another one using Windows Server 2003, with a different solution
It turns out that there was some kind of permission that the COM
Object needed. Setting the AppPool (for the site) on the Win2003
server to "SYSTEM" fixed the problem. For some reasion (by Default)
the ASPNET account has permission to whatever the COM object was
trying to access.
Perhaps one of these solutions will work for you.
The reason it sometimes works for you and not other times, may be related to the contents of the specific excel file, e.g. whether it contains any VBA scripts or references any (specific) modules. So that is something you should look into.

Deploy Office.Interop.Word Word 2010 on Server 2008 and calling methods from ASP.NET

I want to deploy Microsoft Word 2010 and Microsoft.Office.Interop.Word on Microsoft Windows Server 2008.
The user (just a few) visits an .ASPX page. Data is input there or selected from the database from the aspx page. Once data is collected, I want to invoke the a Word application instance on the SERVER and progematically insert the data into ranges in the Word document. That doc gets saved in a folder on the server and/or downloaded onto the user's local machine.
Can I deploy Microsoft Word and the interop assemblies on Win 2008 Server? If not, is there another solution?
i was facing the same error, after spending 2 days of my life i found this solution.
You need to assign permissions to the Microsoft office 2003 - 2007 object.
Please have a look.
Step 1
Go to the Component Services > Computers > My Computer > and select DCom Config
after this, go to the right pane and find "Microsoft Word 98 - 2003 Document" object
Step 2
Right click on the component and go to the properties and select "Security Tab"
Step 3
Add NETWORK, NETWORKSERVICE, IIS_IUSRS and Administrator users and assign them "Local" and "Remote" Access Permissions
Step 4
Now go to the "Identity tab" and select "This User"
In user and password textboxes type administrator crediantals and press "Apply" and "OK (must to save the changes)"
Step 5
Now restart your machine.
it'll works.
Regards,
Don't use Office on Server. Use Open XML...
See this Link:
Microsoft strongly recommends that developers find alternatives to
Automation of Office if they need to develop server-side solutions.
Because of the limitations to Office's design, changes to Office
configuration are not enough to resolve all issues. Microsoft strongly
recommends a number of alternatives that do not require Office to be
installed server-side, and that can perform most common tasks more
efficiently and more quickly than Automation. Before you involve
Office as a server-side component in your project, consider
alternatives.
Most server-side Automation tasks involve document creation or
editing. Office 2007 supports new Open XML file formats that let
developers create, edit, read, and transform file content on the
server side. These file formats use the System.IO.Package.IO namespace
in the Microsoft .NET 3.x Framework to edit Office files without using
the Office client applications themselves. This is the recommended and
supported method for handling changes to Office files from a service.
The Open XML file formats are a public standard. To obtain a copy of
the specification, visit the following Web site:
ECMA-376 Open XML Standard

Publishing an ASP.Net web application to a mapped drive with Visual Studio 2008 and Windows 7

We have a shared drive where web applications are published to. When I attempt to publish I get the following error:
------ Publish started: Project: XXX.Web, Configuration: Release Any CPU ------
Connecting to T:\WebSites\XXX\...
Unable to create the Web site 'T:\WebSites\XXX'. The path 'T:\WebSites\XXX' does not exist or you do not have access. The system cannot find the path specified.
Details
OS: Windows 7
IDE: Visual Studio 2008 (running as administrator)
Path exists? Yup.
I assume it's some permissions issue, but I have no idea where to start.
If anyone is still wondering, I had this same problem in Visual Studio 2012 with MVC4 in windows 7. I had previously published to a mapped drive and now all of a sudden it would no longer publish. In windows explorer I could see the mapped drive, but visual studio claimed it could not find the drive.
It turns out that if you are running visual studio in admin mode and your drive wasn't mapped in admin mode, you have to remap it.
(solution)
To do this, run explorer in admin mode, and then re-map your drive. Afterwards visual studio should be able to see the drive again.
I had this same problem with VS2010 and what worked for me is to click the [...] button next to the target location and rebrowse to the destination folder. Could be that VS is showing one path in the publish and output window, but really trying to access some other folder that's protected in Win7. That's why it worked in XP and not Win7 because Win7 has many more secure folders.
There are two points of check.
Share permissions.
File permissions.
You can both found on the remote computer, right click on the folder name -> permissions, and you see the Sharing and the Security tab. Change them, to left you write.
Help: how to share files:
http://www.howtogeek.com/howto/windows-7/share-files-and-printers-in-windows-7-with-homegroup/
and a video tutorial about :
http://www.youtube.com/watch?v=BWB9pu1T2dQ
Video tutorial for share folder base on my answer
http://www.youtube.com/watch?v=OomgNBAv0hI&feature=related
When you say administrator I will assume that you are an administrator to both the computer and the server containing the mapped drive. If that is the case then,
You might want to give this a shot:
To resolve this problem, add a MIME type for the .tmp file in IIS. To do so, follow these steps:
In Control Panel, open Administrative Tools, and then double-click Internet Information Services.
Expand the (local computer) node, and then expand Web Sites.
Right-click Default Web Site, and then click Properties.
In Default Web Site Properties, click the HTTP Headers Tab.
Click MIME Types. In MIME Types, click New to register a file extension.
In the Extension textbox, type .tmp . In the MIME Type textbox, type temp.
Click OK.
http://support.microsoft.com/kb/817264
If you are not in "Admin" mode and you are still having the issue, you can copy the "Target Location" path setting in your publish profile in VS, and then go to the file menu and check if you have access to that location, if you are prompted to enter user credentials, enter your credentials, this will allow Visual Studio to have the credentials needed. Now, go back to the publish profile and retry, it will use the credentials you just entered.

Remote Debugging Server Side of a Web Application with Visual Studio 2008

So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attach, and start stepping line by line to verify code flow and, you know, debug and stuff :).
I'm sure most of the answers will pertain to ASP.NET code, and I'm interested in that, but my current code base is actually Classic ASP and ISAPI Extensions, so I care about that a little more.
Also, my test server is running in VMWare, I've noticed in the latest VMWare install it mentioning something about debugging support, but I'm unfamiliar with what that means...anyone using it, what does it do for you?
First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are different versions between Visual Studio versions, so make sure they match on the client and server side. On the server, fire up msvsmon. It will say something like "Msvsmon started a new server named xxx#yyyy". This is the name you'll use in Visual Studio to connect to this server. You can go into Tools > Options to set the server name and to set the authentication mode (hopefully Windows Authentication) - BTW No Authentication doesn't work for managed code.
On the client side, open up Visual Studio and load the solution you're going to debug. Then go to Debug > Attach to Process. In the "Qualifier" field enter the name of the server as you saw it appear earlier. Click on the Select button and select the type of code you want to debug, then hit OK. Hopefully you'll see a list of the processes on the server that you can attach to (you should also see on the server that the debugging monitor just said you connected). Find the process to attach to (start up the app if necessary). If it's an ASP.NET website, you'd select w3wp.exe, then hit Attach. Set your breakpoints and hopefully you're now remotely debugging the code.
AFAIK - the VMWare option lets you start up code inside of a VM but debug it from your workstation.
Visual Studio comes with a remote debugger that you can run as an exe on your server. It works best if you can run it as the same domain user as your copy of visual studio. You can then do an attach to process from the debugger on your machine to the IIS process on the server and debug as if it was running on your machine. You get more options for .Net debugging, but there's support for older platforms too.

Resources