I have hosted one site in IIS and ran the application. I have one exe which performs operation after reading the entries from MSMQ. So basically application add the task in MSMQ and exe reads that task and executes it.
I have one separate dll also in that dll I am preparing some href link of html dynamically. For doing this I need server dns and hosted sitename.
Ex: http://localhost/mysite/login.aspx from this url I need only http://localhost/mysite.
I am using this custom dll in one of task that exe executes.
Now the problem is I don't know how to get dns and site name because custom dll won't have HttpContext.Current object.