Click here to Skip to main content
15,507,179 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 7:53
professionalKevin Marois21-Sep-21 7:53 
GeneralRe: SSL Certificate Pin
SlothTheCoder29-Oct-21 16:11
professionalSlothTheCoder29-Oct-21 16:11 
QuestionAPI Controller Question Pin
Kevin Marois26-Aug-21 7:13
professionalKevin Marois26-Aug-21 7:13 
AnswerRe: API Controller Question Pin
Richard Deeming26-Aug-21 7:41
mveRichard Deeming26-Aug-21 7:41 
GeneralRe: API Controller Question Pin
Kevin Marois26-Aug-21 8:28
professionalKevin Marois26-Aug-21 8:28 
GeneralRe: API Controller Question Pin
Richard Deeming26-Aug-21 22:41
mveRichard Deeming26-Aug-21 22:41 
QuestionModal Question Pin
MekaC24-Aug-21 11:40
MekaC24-Aug-21 11:40 
Question.Net Framework Web API - Server Error Pin
Kevin Marois23-Aug-21 12:50
professionalKevin Marois23-Aug-21 12:50 
I have almost zero experience creating a Web API, so bear with me.

I opened VS2019 and created a new ASP.NET Web Application (.Net Framework). It comes with the standard Home and Values controllers.
I hit F5 and it ran. I then used Postman to verify passing "https://localhost:44312/api/Values". I get back the expected results. So far so good.

I then right clicked the project and chose "Publish" and published to a folder. I then copied the contents of the folder to the server and created a new Web Site in IIS pointing to my API and set the port to 44400. I clicked the Browse link in IIS and the browser opened. I added "/api/Values" to the end of the URL and got back this: Click: Here's the result.

I changed NOTHING in the app. Here's the Web.Config, which is what the error seems to be complaining about:
<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=301879
  -->
<configuration>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.7.2" />
  </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>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
        <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
    </compilers>
  </system.codedom>
</configuration>

First question: Any idea what's wrong?
Next question: How do I turn on/enable better debugging?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: .Net Framework Web API - Server Error Pin
Richard Deeming23-Aug-21 22:18
mveRichard Deeming23-Aug-21 22:18 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 5:36
professionalKevin Marois24-Aug-21 5:36 
GeneralRe: .Net Framework Web API - Server Error Pin
Richard Deeming24-Aug-21 7:13
mveRichard Deeming24-Aug-21 7:13 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 7:27
professionalKevin Marois24-Aug-21 7:27 
QuestionWebrequest is obselete what is the alternatieve Pin
Ger F. Versteeg27-Jul-21 0:45
Ger F. Versteeg27-Jul-21 0:45 
AnswerRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming28-Jul-21 0:57
mveRichard Deeming28-Jul-21 0:57 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F. Versteeg28-Jul-21 1:58
Ger F. Versteeg28-Jul-21 1:58 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming28-Jul-21 4:09
mveRichard Deeming28-Jul-21 4:09 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F.28-Jul-21 5:24
Ger F.28-Jul-21 5:24 
QuestionWebsite Deployment Pin
Promise Sheggs21-Jul-21 11:32
Promise Sheggs21-Jul-21 11:32 
AnswerRe: Website Deployment Pin
Member 150787164-Jul-22 19:53
Member 150787164-Jul-22 19:53 
QuestionHow to place text over an image using HTML/CSS? Pin
Alex Dunlop21-Jul-21 8:52
Alex Dunlop21-Jul-21 8:52 
AnswerRe: How to place text over an image using HTML/CSS? Pin
Member 1529865622-Jul-21 22:43
Member 1529865622-Jul-21 22:43 
GeneralRe: How to place text over an image using HTML/CSS? Pin
Alex Dunlop23-Jul-21 8:44
Alex Dunlop23-Jul-21 8:44 
GeneralRe: How to place text over an image using HTML/CSS? Pin
Alex Dunlop24-Jul-21 5:21
Alex Dunlop24-Jul-21 5:21 
QuestionWhat does an "Error 503 first byte timeout" mean? Pin
swampwiz1-Jul-21 20:15
swampwiz1-Jul-21 20:15 
AnswerRe: What does an "Error 503 first byte timeout" mean? Pin
Richard MacCutchan1-Jul-21 22:02
mveRichard MacCutchan1-Jul-21 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.