But when I published to the virtual machine the app & first page index runs fine but the next page does not HTTP error 500.0 I noticed the IIS page acts as if the requested URL is htttp://localhost:80/PageX?nata=2111 and Physical Path C:\innetpub\wwwroot\PageX
That physical path doesn't exist & the diagnostic may not be relevent
The event log looks fine I even put an email to send me if the OnGet() fired on 'PageX' - but nothing happens at published I cannot think this is unique....
I don't believe that was my question... and it certainly worked like I had it. However after thinking more about the methods and that the error seemed like it was looking for the pageX I tried
<ahref="./PageX ( The . didn't seem to be relevant when running IIS Express ( aka out of visual studio )
But when I published tested it with IIS , I still didn't work ,,,
but I may have had my diagnostics further in the code
However when I exchanged <a href with <a asp-page
<a asp-page
etc and then the page was found.
I will likely go back and do more checks to confirm if someother typo was to blame.
I don't believe that was my question... and it certainly worked like I had it. However after thinking more about the methods and that the error seemed like it was looking for the pageX I tried
<a href="./PageX ( The . didn't seem to be relevant when running IIS Express ( aka out of visual studio )
But when I published tested it with IIS , I still didn't work ,,,
but I may have had my diagnostics further in the code
However when I exchanged <a href with <a asp-page
<a asp-page
etc and then the page was found.
I will likely go back and do more checks to confirm if someother typo was to blame.
I don't get the approach since @Html is a helper method that you are using within a tag helper. Plus tag helpers already have an route attribute.
Member
11 Points
49 Posts
second page not reached on IIS
Feb 12, 2019 02:53 AM|andrewcw|LINK
On IIS Express my application calls from a table like this
<td><a href="/PageX?nata=@Html.DisplayFor(modelItem => item.theKey)" class="btn btn-info"
and so forth ....
But when I published to the virtual machine the app & first page index runs fine but the next page does not HTTP error 500.0 I noticed the IIS page acts as if the requested URL is htttp://localhost:80/PageX?nata=2111 and Physical Path C:\innetpub\wwwroot\PageX That physical path doesn't exist & the diagnostic may not be relevent
The event log looks fine I even put an email to send me if the OnGet() fired on 'PageX' - but nothing happens at published I cannot think this is unique....
ExecuteRequestHandler, AspNetCoreModuleV2, aspNetCore, 0x80004005 and the link doesn't make sense ...to me. https://support.microsoft.com/en-us/help/942031/http-error-500-0-internal-server-error-error-when-you-you-open-an-iis
Thanks !!!
All-Star
37101 Points
14968 Posts
Re: second page not reached on IIS
Feb 12, 2019 03:40 PM|mgebhard|LINK
Use basic Razor syntax. This assumes the link is rendered within a foreach...loop where "item" is an array item.
Member
11 Points
49 Posts
Re: second page not reached on IIS
Feb 12, 2019 08:05 PM|andrewcw|LINK
I don't believe that was my question... and it certainly worked like I had it. However after thinking more about the methods and that the error seemed like it was looking for the pageX I tried <a href="./PageX ( The . didn't seem to be relevant when running IIS Express ( aka out of visual studio ) But when I published tested it with IIS , I still didn't work ,,,
but I may have had my diagnostics further in the code
However when I exchanged <a href with <a asp-page
<a asp-page
etc and then the page was found.
I will likely go back and do more checks to confirm if someother typo was to blame.
All-Star
37101 Points
14968 Posts
Re: second page not reached on IIS
Feb 12, 2019 08:19 PM|mgebhard|LINK
I don't get the approach since @Html is a helper method that you are using within a tag helper. Plus tag helpers already have an route attribute.
Participant
1210 Points
429 Posts
Re: second page not reached on IIS
Feb 15, 2019 03:27 AM|Xing Zou|LINK
Hi andrewcw,
t seems that you have used Razor Pages. you could also use @Url.Page to generate url,refer to URL generation for Pages.
For "/PageX" it will route Pages Folder -> PageX.cshtml
For "/Users/Detail", it will route Pages Folder-> Users Folder-> Detail.cshtml.
The ASP Core convention for a link is using tag helpers. The following will invoke PageX.cshtml in the root.
Xing