Click here to Skip to main content
15,867,686 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: SSL Certificate Pin
Richard Deeming21-Sep-21 5:36
mveRichard Deeming21-Sep-21 5:36 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 6:02
professionalKevin Marois21-Sep-21 6:02 
GeneralRe: SSL Certificate Pin
Richard Deeming21-Sep-21 6:37
mveRichard Deeming21-Sep-21 6:37 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 6:53
professionalKevin Marois21-Sep-21 6:53 
GeneralRe: SSL Certificate Pin
SlothTheCoder29-Oct-21 15:11
professionalSlothTheCoder29-Oct-21 15:11 
QuestionAPI Controller Question Pin
Kevin Marois26-Aug-21 6:13
professionalKevin Marois26-Aug-21 6:13 
AnswerRe: API Controller Question Pin
Richard Deeming26-Aug-21 6:41
mveRichard Deeming26-Aug-21 6:41 
GeneralRe: API Controller Question Pin
Kevin Marois26-Aug-21 7:28
professionalKevin Marois26-Aug-21 7:28 
GeneralRe: API Controller Question Pin
Richard Deeming26-Aug-21 21:41
mveRichard Deeming26-Aug-21 21:41 
QuestionModal Question Pin
MekaC24-Aug-21 10:40
MekaC24-Aug-21 10:40 
Question.Net Framework Web API - Server Error Pin
Kevin Marois23-Aug-21 11:50
professionalKevin Marois23-Aug-21 11: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 21:18
mveRichard Deeming23-Aug-21 21:18 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 4:36
professionalKevin Marois24-Aug-21 4:36 
GeneralRe: .Net Framework Web API - Server Error Pin
Richard Deeming24-Aug-21 6:13
mveRichard Deeming24-Aug-21 6:13 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 6:27
professionalKevin Marois24-Aug-21 6:27 
QuestionWebrequest is obselete what is the alternatieve Pin
Ger F. Versteeg26-Jul-21 23:45
Ger F. Versteeg26-Jul-21 23:45 
AnswerRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming27-Jul-21 23:57
mveRichard Deeming27-Jul-21 23:57 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F. Versteeg28-Jul-21 0:58
Ger F. Versteeg28-Jul-21 0:58 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming28-Jul-21 3:09
mveRichard Deeming28-Jul-21 3:09 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F.28-Jul-21 4:24
Ger F.28-Jul-21 4:24 
QuestionWebsite Deployment Pin
Promise Sheggs21-Jul-21 10:32
Promise Sheggs21-Jul-21 10:32 
AnswerRe: Website Deployment Pin
Member 150787164-Jul-22 18:53
Member 150787164-Jul-22 18:53 
QuestionHow to place text over an image using HTML/CSS? Pin
Alex Dunlop21-Jul-21 7:52
Alex Dunlop21-Jul-21 7:52 
AnswerRe: How to place text over an image using HTML/CSS? Pin
Member 1529865622-Jul-21 21:43
Member 1529865622-Jul-21 21:43 
GeneralRe: How to place text over an image using HTML/CSS? Pin
Alex Dunlop23-Jul-21 7:44
Alex Dunlop23-Jul-21 7:44 

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.