WebSphere Outbound FTP adapter doesn't work on IIS - iis

As is clear from the title, we are developing some applications on WebSphere ESB 7.5 by using FTP Adapter. When we try to create a new file on a ftp directory, we get the following error
ResourceException thrown in J2CMethodBindingImpl.invoke() javax.resource.spi.InvalidPropertyException: Adapter failed to check permission on the specified directory.Either the DirectoryPath does not have the necessary permissions for outbound operation or the long listing provided by the FTP server differs from the standard format.
By using the same username/password pair I can view/edit/remove and create files under these folders. The strange part is, when I update configuration as:
Host: 10.10.0.78, Directory:
There is no problem. But when I do this
Host: 10.10.0.78, Directory: /test
I get the exception. Any suggestion ?
Details:
FTP Server is Windows / IIS 7
WebSphere Application Server 7.0
ESB 7.5.1.1
FTP Adapter 7.5.1
Integration Designer 7.5

After I changed the listing type from MS-DOS to UNIX from IIS, it worked.
But the technical documents say by changing the Custom Parser Class Name to "com.ibm.j2ca.ftp.util.FTPLongListEntryParser" is another solution.
I tried that one, but still no progress.
I having some classNotFoundException but I'm still working and I let you know the updates...

I solved my problem as:
• Write a new customParserClass that extends org.apache.commons.net.ftp.parser.NTFTPEntryParser.
• Add this to build path of the FTP Adapter.

Related

Localhost webserver denying PUT request

I have configured a webserver on localhost with https using Microsoft IIS Administration. I am able to browse directory with files with browsers and Visual Studio using localhost prefixed with https, such as https://localhost/trial etc.
I wish to upload a file to the said directory, ie., trial, using Libcurl to test some features. Unfortunately I'm unable to do so.
Using the same Libcurl example as given on
Libcurl File Upload
-modified for https, the console window tells me that the following has occurred, upon running the code :
IIS 10.0 Detailed Error - 405.0 - Method Not Allowed
HTTP Error 405.0 - Method Not Allowed The page you are
looking for cannot be displayed because an invalid method (HTTP verb)
is being used.
I checked the IIS Administrator and saw that all authorizations are allowed. I suppose the fact that it is flagging a HTTP verb issue rather than HTTPS as I'd enabled and used as URL in code isn't a big thing?
Libcurl uses PUT for uploading files, so should be an allowed verb.
I am quite new to this, so I'm not certain I did something incorrect with the setting up of the webserver, or whether there are security issues or permission issues which are causing a problem here.
As far as I know, there is impossible to use http put or post a file to a IIS web application's folder without writing server-side code. Otherwise, configure an FTP site on your IIS installation. Then you could use ftp command to upload the file.
If you really need using HTTP put or post to upload the file, you could consider using WebDav.
More details about what is webdev and how to use it, you could refer to below article.
https://learn.microsoft.com/en-us/iis/install/installing-publishing-technologies/installing-and-configuring-webdav-on-iis
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-7/what39s-new-for-webdav-and-iis-7
Try hostname instead of localhost
Add a trailing slash (/) for the directory.

Hosting ASP.NET 5 WebAPI in IIS using a virtual directory/application

I am trying to host a new ASP.NET 5 WebAPI project in IIS, and I am using the ASP.NET 5 RC 1 runtime. The project that I am using is the standard generated template for a new ASP.NET 5 WebAPI project. (No code changes.)
I have successfully published the project using the command line, and I can get the application to work in a new web site using a specific port, such as localhost:12345. For example, accessing localhost:12345/api/values returns the values.json data from the project template.
However, when I try to use an IIS Application folder for the project, I am getting a 404 error. In other words, localhost:12345/WebApi1/api/values returns a 404 error. But I can see Kestrel running on a random port in the Event Viewer, and if I access the data on that port, I do get values.json back, so I know Kestrel is running.
Is there something special that needs to be done to get an ASP.NET 5 WebAPI project working in an IIS Application folder under a web site?
Side note: if I use --server.urls to set a port for Kestrel, it's running both on the requested port and the random port logged in the Event Viewer. (So it's actually available from Kestrel from 2 URLs, not the single one configured by --server.urls.)
Kiran Challa's link above indeed does fix the problem. Put this in your Configure method in Startup.cs
app.Map("/IISApplicationFolderName", (myAppPath) => this.ConfigureApp(myAppPath, env, loggerFactory));
where IISApplicationFolderName is the name of the IIS application folder that you want to host under. The rest of the configuration code moves to the new method ConfigureApp, since you're delegating your configuration to that method.
This also looks to be a temporary patch until ASP.NET 5 RC2 is released.

IIS 7.5 Virtual Directory to Mapped Drive

I have an S: which is connected via a username that exists both on server1 & server2.
The mapped drive works fine.
I connect this as a virtual directory called config in IIS it connects and works fine. I can see in content view the files in the mapped drive.
When I attempt to browse to one of these files it gets an error 500
http://www.mydomain.com/config/file.html
file.html is there
I've done this before, Im sure its a permission or security issue somehow, but I cant work it out
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Give up mapped drives please,
http://support.microsoft.com/kb/207671
http://support.microsoft.com/kb/257174
The answer was two part.
Part one I was simply browsing the website, I wasn't using https and thus I was getting a different IIS site that didn't have the virtual directory.
Part two was I was using ColdFusion attempting to run a .cfm from the virtual directory, even with the correct website, it still got an error 404.
The resolution for this was to ensure the ColdFusion service was run as Administrator rather than LocalSystem and all was good.
Just for everyones reference, if you create the same username / password on both servers, share using that username, connect using UNC path and that username and it will work, no special permissions or anything.
Thanks to Karl & Lex for the help.

Mercurial, abort: authorization failed

I'm having problems accessing a mercurial repository. (mercurial 1.7.1)
Its set up on IIS6 windows 2003 over Https,
I can access the site through a browser using the same credentials,
I can access the site if I enable anonymous access for the virtual directory in IIS, but I need to use the Integrated Windows authentication.
I have tried setting the path in my hgrc file to:
[paths]
default = https://username:password#example.site.com/hg/hgweb.cgi/TestRepository
then if I try to Push or Pull I get the error message:
abort: authorization failed
Any Ideas?
The most useful output is probably in your webserver/IIS logs -- check there. You can also try --debug on the mercurial command line to get a little more output, but it's likely going to be on the web server side.
I have changed the Directory security authentication mode to basic authentication. For the time being this seem to be sufficient for our needs

IIS FTP 7.5: Custom Auth Provider not working Error 530

I have recently install Server 2008 R2 on a new server and want to use the FTP capabilities that are now shipped with IIS 7.5.
Since my users are not windows users, I was using IISAuthManager but this prodiver does not offers home directory on a user basis.
I found this sample http://learn.iis.net/page.aspx/669/how-to-use-managed-code-c-to-create-an-ftp-authentication-provider-using-an-xml-database/ to get going with a simple xml based user config. But i can't make it work. It's always gving me
Response: 530-User cannot log in.
Response: Win32 error: The system cannot find the file specified.
Response: Error details: An error occured during the authentication process.
I used procmon to get if the xml config file was read with no luck. I don't even think my assembly is being used.
Anybody ever had the same issue ? Basicly, any tips would be apreciated.
The IIS FTP custom providers are a nightmare to debug. In this case sounds like a config error, check that you followed the set up instructions (or manually checking applicationHost.config). Or post your code (inc config) if you still need help.
Barry
IIS Manager > Your site > FTP Authentication
Probably, you have all Basic and Anonymous Authentication disabled.
One of them should be enabled.

Resources