Problems with MVC 4 Azure Website - asp.net-mvc-4

I have deployed an MVC 4 website on Azure over the last half an hour or so and I am having a few problems with the website.
One page is meant to be pulling information out of the database and displaying it. The content is in Sql Azure, but nothing is still coming out.
The user logins, and can go into a dashboard to add content to the system.
This are the two problems I am finding but a 404 error displays.

MVC routing issue?
Check you don't have something strange in Global.asax.cs
Are you using Forms based authentication?
Are you using additional libraries / components like ELMAH that could be causing the issue?
Have you configured a custom domain i.e. mydomain.com?
Also refer to section 'View failed request tracing logs' in the Troubleshooting Windows Azure Web Sites in Visual Studio

Related

Blazor WebAssembly - How can I add a new *.razor page that don't need to recompile or rebuild the project

I am developing a survey project which collects data from the client with Blazor WebAssemly for the Client-side. Each survey form will have a different design and edit-checked rule. So I decide when I create a new survey form, the application will generate a new *.razor page automatically, for example, ClientSurvey.razor page. Everything works well until I navigate the web application to the ClientSurvey.razor I just have created. The system shows error:
404 Not found.
I have to rebuild the project again, and it can show the ClientSurvey.razor page on my website.
With ASP.NET MVC before I don't have to rebuild the project when I add a new aspx page. Does it still work with Blazor WebAssembly? If yes, how can I change the razor page, and it can update on my website automatically without rebuild or recompile?
And I also meet a problem that when I deploy the project in IIS, I don't see where the UI (.*razor) pages are stored, I know they are compiled to dll. How can I keep them in raw files in the same way with ASP.NET work? With ASP.NET, when I deploy it in IIS, there is always a folder to store aspx pages.
Updated: please see the figure to more clearly

IBM Worklight login Page

I'm in the process of building an end-to-end application.
I want to incorporate a simple login page that will verify credentials against a database. I need the page to be the first page that is displayed when I run the application. I have read the various modules on authentication but their design is a little different.
I have found other resources on like Sunil's notes on how to enable form-based login but this involves modifying auth.js that isn't present in Worklight v6.0.
I'm also unsure if I should use the single sign on approach, but that would mean getting additional software like Websphere Portal which I'm not too keen on.
FYI, my UI is entirely built using dojo/dojo mobile.
Are you using Worklight 6.0? If you are seeing some of our older sample projects may help you out. You should check out one of our older samples based around form-based authentication, here is a link to all tutorials and samples:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.0.0/com.ibm.worklight.getstart.doc/start/c_gettingstarted.html
Here is a link to form based authentication tutorial and below the form based authentication sample:
Tutorial: http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/08_02_Form_based_authentication.pdf
Sample: http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/FormBasedAuthenticationProject.zip

People picker not working in classic mode web application in SharePoint 2013

I have a SharePoint 2010 web application migrated to SharePoint 2013. this is a classic mode web application, we are not using claims, my client doesn't wants it ( Don't ask why?).
I had other web application migrated as same process but i can add users in them.
but in this i am not able to.
I can add users and find users in the web application in central administration. But not in the web application itself.
I am not sure what changes i have to make so that it starts picking or finding users from the people picker. any ideas.
it was because of the asp.netvalidation=2.0 not present in the httprequest line in webconfig. there was no validation for the input provided in any input box.
once we added the asp.net validation it worked fine.
It is a browser compatible issue as well whereas in new browser like IE 10 and other latest browsers it doesn't play well.
we updated the
In short the fix is to edit the pickerdialog.master file in notepad and add a meta data tag, , to the header section.
well keep in mind always save a local copy of your original master page.
it is recommended not to update any original files, we can run the site in compatible mode too.

How do I register a controller that has been created in an AREA

I am using MVC4's WEB API to expose a controller.
Initially I created created a MVC4 WEBAPI project, set the project not to open any web page, wait for an external app to call the URL (WEB API). The project in VS2010 is set to run from IIS7 Express, not VS2010's Dev Server. This works OK, the browser prompts me to down load a file. Which is OK for me, as the browser does not know what to do with the returned data (RAW TEXT).
Next, I created an AREA in the MVC4 project area, then added a controller (WEB API type).
Then I once again ran the project and in a browser entered the the URL (WEB API). And it fails.
Ed.
The DefaultHttpControllerFactory doesn't work with Areas by default. To get this functionality you have to write your custom HttpControllerFactory.
You can find how to do this at the post How to create HttpControllerFactory to support Areas
While it is possible to place WebApi Controllers in different Areas, ASP.NET MVC 4 RC will still treat these ApiControllers as if they all reside in the same namespace. This is a limitation of the DefaultHttpControllerSelector, which is responsible for selecting the appropriate ApiController.
Fortunately, you can inject your own implementation of this class. In fact, I've already encountered this very issue and written an "area aware" HttpControllerSelector. You can find a blog post of mine about this issue and its solution here:
http://blogs.infosupport.com/asp-net-mvc-4-rc-getting-webapi-and-areas-to-play-nicely/

SharePoint 2010 FBA with custom form - 403 error

I have a SharePoint 2010 site that is configured for Forms Based Auth using custom role, membership and profile providers. This works perfectly using the OOTB SharePoint 2010 FBA form (ie. under /_forms in the web app virtual directory).
My problem is with a custom login form that is located in a separate folder, /Landing/Login/default.aspx. I've configured the web app to point to this form (contains an unmodified ASP.NET login control), which is rendered when the user hits the root URL. The problem comes when they submit their credentials and the form posts back for the redirection to /_layouts/Authenticate.aspx. It stops cold with a 403.
If I revert back to the OOTB FBA form (using the same providers) everything works fine. Any suggestions on what could be going wrong?
So, I discovered the solution after examining the OOTB FBA login form that inherits from Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage and taking a look at the code with Reflector.
I modified my custom form to inherit from the same object and replicated the content placeholders (some I put into a panel control with the visibility set to false) from the OOTB Form.
Presto. My custom form now authenticates flawlessly. On reflection, this seems an obvious thing to do, just isn't documented anywhere.
I just went through this process myself, and wrote up the steps I had to take to get FBA working with a custom login form. Hopefully it'll help the next poor soul that is trying to get this to work.
http://mikevallotton.wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-2/
If you want to use ready-made solutions for the management of FBA users, you should take a look here:
http://www.devit.eu/products/121-fba-manager-sp2010-forms-based-authentication.aspx