c# - How to make ASP.Net WebAPI Server available for LAN -


i'm trying host asp.net webapi , make available devices connected on lan.

i can able access api localhost

getting proper response api

when try access api other computer in same lan, api getting bad request - invalid hostname http error 400

bad request - invalid hostname

i have added inbound rules port number 52022

my binding configuration in

c:\users***\documents\iisexpress\config\applicationhost.config

       <sites>             <site name="website1" id="1" serverautostart="true">                 <application path="/">                     <virtualdirectory path="/" physicalpath="%iis_sites_home%\website1" />                 </application>                 <bindings>                     <binding protocol="http" bindinginformation="*:52022:localhost" />                     <binding protocol="http" bindinginformation="*:52022:" />                 </bindings>             </site>             <sitedefaults>                 <logfile logformat="w3c" directory="%iis_user_home%\logs" />                 <tracefailedrequestslogging directory="%iis_user_home%\tracelogfiles" enabled="true" maxlogfilesizekb="1024" />             </sitedefaults>             <applicationdefaults applicationpool="clr4integratedapppool" />             <virtualdirectorydefaults allowsubdirconfig="true" />         </sites> 

still not able access api computer connected in same lan.

in order make web application available on lan need deploy service on local host. here links

deploy web api on localhost

and

deploy asp.net web api on localhost


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -