c# - Web Api is not working from Godaddy but working good in local -


i have uploaded site in 2 separate project. first part ui , second part web api. uploaded both on godaddy hosting panel unable call web api service. try sample valuescontroller not working. getting http/1.1 404 not found error when try call web api service web.config file code below

<?xml version="1.0" encoding="utf-8"?> <!--   more information on how configure asp.net application, please visit   http://go.microsoft.com/fwlink/?linkid=301879   --> <configuration>   <configsections>     <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 -->     <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" />     <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 -->   </configsections>    <entityframework>     <defaultconnectionfactory type="system.data.entity.infrastructure.localdbconnectionfactory, entityframework">       <parameters>         <parameter value="v11.0" />       </parameters>     </defaultconnectionfactory>     <providers>       <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserver.sqlproviderservices, entityframework.sqlserver" />     </providers>   </entityframework>   <appsettings></appsettings>   <system.web>     <compilation debug="true" targetframework="4.5" />     <httpruntime targetframework="4.5" />   </system.web>   <system.webserver>     <handlers>       <remove name="extensionlessurlhandler-integrated-4.0" />       <remove name="optionsverbhandler" />       <remove name="traceverbhandler" />       <add name="extensionlessurlhandler-integrated-4.0" path="*." verb="*" type="system.web.handlers.transferrequesthandler" precondition="integratedmode,runtimeversionv4.0" />     </handlers>   </system.webserver> </configuration> 

controller page

using system; using system.collections.generic; using system.linq; using system.net; using system.net.http; using system.web.http;  namespace api.controllers {     public class valuescontroller : apicontroller     {         // api/<controller>         public ienumerable<string> get()         {             return new string[] { "value1", "value2" };         }          // api/<controller>/5         public string get(int id)         {             return "value";         }          // post api/<controller>         public void post([frombody]string value)         {         }          // put api/<controller>/5         public void put(int id, [frombody]string value)         {         }          // delete api/<controller>/5         public void delete(int id)         {         }     } } 

no changes in router , other file.


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 -