Cannot find project pages after publishing on server (Razor Pages) - asp.net

I have a serious problem that I can not find the cause.
The project works well when running on localhost and without any problems.
But since I published in server it, it does not find some pages in the server .
Like the photos below
Look at this photo of the bar that can not find the path of the entered page.
This is a local host photo that has found the page well
This is my routing system in startup.cs
Server with plesk control panel
Is there a problem with the server?

It's a bit late, but I had the same issue with Index page, and found out that in .csproj file there was something like this and <_ContentIncludedByDefault Remove="Pages\Index.cshtml" /> and after removing those lines everything worked perfectly.

Related

Dnn Rich Text(Text editor) template manager doesn't load

I've been working with DNN for the past weeks and now it's finnaly time to make my project to the production server, but I found an issue.
In the default Rich Text we have a "Template" option, witch we can save html presets, saving them works fine. But when I try to open the list of templates, the small popup opens and stays forever loading, no error displayed.
Ethernal loading image
I believe it's a config issue, since it works fine on my development eviroment. The server is running Windows Server 2008 R2(so, no IIS AppPool\DefaultAppPool user to give permissions). Also I already gave permission to IIS_IUSRS and to IUSR.
If someone could help me, that would be awesome =)
Best Regards
do other dialogs fail as well, or just this one?
My guess is that the folder, which contains the templates, doesn't exist - or it does exist, but DNN doesn't know about it. So make sure you have it and that the the DNN files are synced with the DB (in the admin > files section)

ASP.Net 4.0 Error Message - BC30456: 'Title' is not a member of

I have a ASP.Net 4.0 Web forms page that is giving me the following error on our web server
This page runs correctly on my localhost computer. This is the only page in the web app that has this issue. I've tried coping the contents of the \bin directory to the web server and copying the ASPX web page from my localhost to the web server.
Any thoughts as to what I would try next?
This happened to me when I had two pages with the same "inherits" name.
I copied a "search" page, and renamed it "search2". It worked great "on my machine". :)
Next, I deployed... and got the "'Title' is not a member of" error. My html page had Inherits="Private_Search", the exact same as the page I copied it from! Also, the code behind was the same.
I changed that to Inherits="Private_Search2", and then in the code behind, renamed my class to Private_Search2, and now, no more errors!
If you recently copied a module, renamed it, and ran with it... check the inherits and the code behind class name.
happy coding!
From this thread of ASP.NET forums, it is concluded that you first need to delete all the pages from the bin directory and then copy it again. It might be an issue of caching here! A full refresh might be required to handle this case.

Dreamweaver CS6 Site Setup for Test Site with MAMP and WordPress NIGHTMARE

I have been trying to set-up a test site server on Dreamweaver CS6 IDE (which I hate) to try out the Dynamically-related files theming feature. I have been attempting to do this for hours and looked at more tutorials and blogs than I can remember attempting to set-up a test site so that I can simply try out this feature but nothing seems to work.
On the Site box I have:
Site Name: test site
Local Site Folder: users/myname/Sites/wordpress/
On the Servers I have:
Server Name: Apache
Connect using: Local/Network
Server Folder: users/myname/Sites/wordpress/
Web URL: http://localhost:80/wordpress/
Advanced:
Server Model: PHP MySQL
Yet I am receiving the an Error message:
Dynamically-related files could not be resolved because the site
definition is not correct for this server
Which makes no sense to me. Can anyone explain what am I doing wrong?
"i was under the impression that this feature would somehow convert PHP syntax into HTML so that it can be easily edited..."
What in God's name gave you that impression? PHP is server-side scripting; a way for the browser to communicate with the server and database and HTML is a way for the browser to communicate with the client (you) and render things in a form which is usable by humans. There is no "conversion", as they are two universally different languages, each serving unique functions.
In order to "easily edit" PHP, the only solution is to learn PHP scripting and syntax.
MAMP's sole purpose is to install an Apache server, PHP, and mySQL on your local computer for a server-side/database framework, such as WordPress, to store information and communicate with. Essentially like creating a mini web-host on your local machine, allowing you to check the functionality of PHP based applications.
These setting are working for me:
Open the Dreamweaver Site Setup window
Select "Servers"
Server Name: localhost
Connect Using: Local/Network
Server Folder: MAMP/ /Applications/MAMP/htdocs/your_directory_name/
Web URL: http://localhost:8888/your_directory_folder/
For a full explanation: http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html#articlecontentAdobe_numberedheader_2
I have come across the same issue and found this thread.
The post that explains a bit what we want to hear is post #6 by David_Powers on 01-May-2010 at 05:31.
So to make the problem go away you can go to 'Edit -> Preferences' and disable 'Discover Dynamically-Related Files' while leaving 'Enable Related Files' activated.
Although this fixes the error display I don't quite understand what David_Powers says this function will do and if I actually want it turned on. If someone could help me realize what this option does I would appreciate it.
I don't know if this is relevant, but after many tries to figure out the Server not found error, I stumbled across MAMP Preferences on the start up page.
After clicking on Preferences, I noticed that the Document Root was pointing to username/Sites instead of MAMP/htdocs.
MAMP Preferences > Document Root > browse to select
After I set the Document Root folder to htdocs, I finally got Dreamweaver CS6 to display my php file when I clicked the Live button in split screen mode.
None of the other answers I searched mentioned setting MAMP preferences to the Document Root folder. I hope this helps.

No styles / images on asp.Net MVC 2 application

Greetings
i have a little problem with my ASP MVC application.
On my local development server everything works just fine but when i try to publish the application to an IIS 7.0 server it just displays plain pages without any styles / markups / images.
I put all those things in the /Content/ subfolder but when i try to access that folder on the production server it just returns me a 404 not found error.
I set the IIS server up with .Net 4.0 and followed the deployment guide on here: http://www.asp.net/learn/mvc/tutorial-08-cs.aspx
All views / controllers / classes seem to work just fine, the only thing which does not is the content subfolder and i cant see why.
Anyone got a suggestion what i could have overlooked or does anyone know that problem?
I had the same issue, but I found the reason why it was forcing authentication on the Contents folder.
When a user is not logged in yet, they are classified as Anonymous Authentication. In IIS7 (which is what I am using, guessing it is the same in IIS6) you need to open the authentication window in features view. Then edit the Anonymous Authentication, to use your application pool identity, or the default one, just make sure that user has permissions to read in that folder.
That fixed it for me, hope it works for you.
Well, I added the IIS_IUSRs to the project directory and found the same problem:
CSS won't load and nothing from the content folder.
But it resolved the Unable to start debugging on the web server problem.
Then, I added the IUSR to the same folder and that fixed the problem. Now, I can see images, css styles and all that stuff.
This is because you are probably using a fixed path on the src, like: ../../Content/Styles/style.css. In MVC you should use the Url helper: Url.Content("~/Content/Styles/style.css").
Using the Url helper you should have no issues.
Been pulling my hair out all night with this one.
On W2K8, MVC2, .NET 4.0, and IIS 7 (using VS 2010)
Made sure that IIS_IUSRS had full rights to the root folder but still no go - css, js, images still not being accessed in rendering the page....
and then .... so simple:
In Features view for the site - defined MIME types for .js, .css, and .jpg - and voila!
Sweet!
p.s. my 1st mvc app - and I think I'm liking it...
Check the properties of your content folders...see if they are not 'copying locally' for some reason.
The folder that your virtual directory is pointing to gave to the user "All" reading properties.

Why would an aspx file return 404 ("The page cannot be found")

Why when I access an aspx (e.g., http://www.example.com/foo.aspx - not the real site) through IE6 would I get a 404 Error (i.e., "The page cannot be found") in IIS6
I've got scripts enabled for the website and I've tried with executables enabled as well.
Here is the full error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or
is temporarily unavailable.
------------------------------------------------------------------------------
Please try the following:
Make sure that the Web site address displayed in the address bar of your
browser is spelled and formatted correctly.
If you reached this page by clicking a link, contact the Web site
administrator to alert them that the link is incorrectly formatted.
Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
------------------------------------------------------------------------------
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the
words HTTP and 404.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for
topics titled Web Site Setup, Common Administrative Tasks, and About Custom
Error Messages.
I can get to Default.htm in the same directory, so I know the path is right. I've opened it up to everyone (temporarily) so I know the permissions are right.
It could be a lot of things. I had this issue today because .NET had not been re-initialized after installing IIS (aspnet_regiis -i -enable or equivalent).
Check that the anonymous user under which the site runs has read access to the file foo.aspx.
IIS6 and later uses a 404 response, thereby not letting an attacker know whether such a file even exists.
I just happened to find another culprit for this issue. My foo.aspx page referenced a particular master page that had a <%# Register %> directive to a user control that did not exist. Removing the reference to the non-existent user control caused my foo.aspx to load instead of 404.
I found a solution here.
The real catch was using this:
Response.TrySkipIisCustomErrors = true;
The site is pointing to a different directory where the page is not.
It could be permissions, however I would think you would get an access error instead.
I'm assuming you are running IIS.
Check that www.example.com is going to the site that you think it is.
If you are hosting multiple sites on the same IP using host headers you may want to double check the name you are using is going to the site you think it is.
Ray and Joe probably have it. In order to serve any file type, IIS has to have a mapping for it. Aspx files require that they be mapped to the AspNet ISAPI dll, which the .Net installation normally takes care of. If you install IIS after .Net (and I'm sure there are other situations), you have to initiate this yourself by running aspnet_regiis.
ALTERNATE SOLUTION (same error perhaps different cause).
I had installed Visual Studio 2008 Pro without SQL Express it, and it caused this same error. Reinstallation of VS2008 with sql express included seemed to have corrected the problem, or perhaps the install took other actions. I did try to register ASP.net numerous times prior but no luck however it is definitely the most probable cause Just posting my experience for those pulling their hair as I was..
Thanks
If you register the .NET 4 version of IIS, you may find it's grabbed the registration of the aspx extension. If ASP.NET v4 is prohibited then 404 will be returned
I had this issue where some customers were reporting the 404.0 and some didn't have the problem at all(same page). I was able to navigate to any of the pages with no problems from my machine. Some customers would refresh and it would go away. I am using .Net 4.5.2 and IIS 7.5.
Looking at the IIS log file I would see:
sc-status sc-substatus sc-win32-status
404 0 2
sc-status.sc-substatus: 404.0 - Not Found
sc-win32-status: 2 - ERROR_FILE_NOT_FOUND
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
https://en.wikipedia.org/wiki/HTTP_404
I found the problem was I had deployed a new version of the website in which the old version of the website had RouteConfig.cs/FriendlyUrlSetting setup by creating a project using the web forms template. The new version was created using an empty template. So obvious to me now.. no URL routing. Customers had a cache issue with certain pages on their machine(no .aspx extension) and having them clear browser data ultimately fixed the problem.
I got this issue when I tried using a different drive to host my apps. I ended up moving them to the wwwroot folder because it was working there and I did not have to time figure out why it is not working on the E:\ drive.
I had bin\roslyn compiler missing. Adding that all worked fine.
Check for double quote errors. I started getting a 404 on a single page because I accidentally had this:
<asp:TemplateField HeaderText="ImageURL"">
instead of this:
<asp:TemplateField HeaderText="ImageURL">
For an aspx page, error 404 can be quite misleading! I have seen all the answers and they presuppose assuming various issues with the file, page, path, etc. but the simplest issues is the fact that if there is an error in your asp page (i.e bad format, improper usage of control, etc. asp will think the page does not exist and will post a 404 when in all actuality, it is easy to ascertain if there is a bad format by simply clicking on design mode. If the page does not render no need to do anything else but look at what is causing the render error, fix and viola'! Your page shows since it was never missing or can't be found, but it simple did not know how to display! Too often people go looking for the wrong solutions and waste so much time! Hope this helps somone. :-)

Resources