locked
How to get web application url in webservice RRS feed

  • Question

  • User-510697852 posted

    I have application with two components, mobile application (e.g. iPad, android tab) as front-end and web application as back-end.

    Whatever data transfer happens at mobile application is through different web services written in ,asmx page in my web application. 

    Now in one of my web services I send email notification to client. In that email I need to provide my backend login page URL link to user. So user can access back end application using his/her laptop using that link. If user clicks that link, it should take him to web application login page.

    How can I get that URL link in web service?

    So suppose this is my web application login page URL, 

    http://IP address of web server/TestApplication/Login.aspx.

    So how can I get this link in web service?

    Wednesday, April 4, 2018 4:26 AM

All replies

  • User1120430333 posted

    Now in one of my web services I send email notification to client. In that email I need to provide my backend login page URL link to user.

    Backend login page?  This doesn't seem viable. 

    How can I get that URL link in web service?
    So suppose this is my web application login page URL,
    http://IP address of web server/TestApplication/Login.aspx.

    --------------------------------------------
    So how can I get this link in web service?

    I don't understand what you are talking about.

    Thursday, April 5, 2018 4:25 PM
  • User1168443798 posted

    >>How can I get that URL link in web service?

    How will the web service know what the URL is?

    Do you want to get the ip of the request from the client?

    I suggest you try code below:

    string host = HttpContext.Current.Request.UserHostAddress;

    Best Regards,

    Edward

    Friday, April 6, 2018 4:45 AM
  • User753101303 posted

    Hi,

    Unclear.  If this the same server you can build the link. If not you could just get this information from a configuration value my understaning being that you just want to send a  message that includes a https://mysite.com/TestApplication/Login.asp

    Wednesday, April 11, 2018 5:25 PM