sockets - Get ServiceDefinition.csdef from an Azure instance -


I need to get the original endpoint configuration from the .csdef file, how can I do this?

I can not use RoleEnvironment.CurrentRoleInstance.InstanceEndpoints because it gives me internal / local port in the virtual IP but I have to know that the port is being shown to the public is.

For example, I have an FTP server with the tcp 21 end point, but when I have a retramem in the archive it's something like tcp 5100 Could. When I bind the FTP server to tcp 5100 and for example, works perfectly with 127.0.0.121 ,

but the example For, when I need to install PASV mode, I have to send back the IP and port where the client should be connected. I work outside the IP, but how can I know that the port is configured for PASV? The port in the previous archive is not definite for the same way that it is revealed in the public interface.

So basically, how do I get the original .csdef configuration?

Cheers

I'm not sure that it works with FTP, But when HTTP is used, then this internal address and port, if using HttpContext.Requst.Url. I was instead using the header ["host"] Hope it helps.

Comments