I have created and tested successfully an application in my local machine on Webmatrix. Then I publish that application in an account of Windows Azure. The application runs but one feature isn't working, an ajax call to a cshtml page in the application.
The code where I'm getting the error:
In the browser console I get the error as undefined, the complete json and the status as error. Why this ajax call is failing in Azure but it's working on localhost?
I have also a doubt where to find the database file (.sdf SQL Server CE) in Windows Azure Website/Database. When publishing I checked the database to "Copy as file" but I didn't found it in Azure Databases. I know that is there because the application is working and display the data from the database file. I think that the database (.sdf) would be somewhere in File System Storage Azure with all css, cshtml and javascript files, but I don't know how to access them. Can I access those files?
Yes the database is fine and I found a way to see it's content, using Visual Studio Server Explorer feature.
I didn't find a solution for my ajax call error. Why this ajax call to a project local file (cshtml) is returning error in Azure when it works perfectly on my local machine?
Is this forum the most appropriated to ask about Azure related problems like mine, where a working Webmatrix deployed application fails a ajax call when executed on a azurewebsite?
i don't know that this is an Azure problem. when I look at your code, it appears that you have an MVC application and are attempting to call a view page instead of the action. My ajax calls look like so:
jose.gouveia
Member
217 Points
69 Posts
Error Deploying Application in Azure Website
Sep 25, 2012 04:51 PM|LINK
Hello all,
I have created and tested successfully an application in my local machine on Webmatrix. Then I publish that application in an account of Windows Azure. The application runs but one feature isn't working, an ajax call to a cshtml page in the application. The code where I'm getting the error:
In the browser console I get the error as undefined, the complete json and the status as error. Why this ajax call is failing in Azure but it's working on localhost?I have also a doubt where to find the database file (.sdf SQL Server CE) in Windows Azure Website/Database. When publishing I checked the database to "Copy as file" but I didn't found it in Azure Databases. I know that is there because the application is working and display the data from the database file. I think that the database (.sdf) would be somewhere in File System Storage Azure with all css, cshtml and javascript files, but I don't know how to access them. Can I access those files?Regards,Jose.wavemaster
Participant
1289 Points
1127 Posts
Re: Error Deploying Application in Azure Website
Sep 25, 2012 05:51 PM|LINK
You are fine on the database. Same here, it works fine.
You can access the db from WebMatrix, either download a copy to local or refresh the database on Azure from WebMatrix.
jose.gouveia
Member
217 Points
69 Posts
Re: Error Deploying Application in Azure Website
Sep 26, 2012 08:35 AM|LINK
Thanks for your reply,
Yes the database is fine and I found a way to see it's content, using Visual Studio Server Explorer feature.
I didn't find a solution for my ajax call error. Why this ajax call to a project local file (cshtml) is returning error in Azure when it works perfectly on my local machine?
Regards,
Jose.
wavemaster
Participant
1289 Points
1127 Posts
Re: Error Deploying Application in Azure Website
Sep 26, 2012 12:29 PM|LINK
Don't know much about ajax.
jose.gouveia
Member
217 Points
69 Posts
Re: Error Deploying Application in Azure Website
Sep 26, 2012 01:16 PM|LINK
Thanks anyway for your help and time spent.
Hope there is someone who knows the reason for the ajax call failure in Azure.
Any tip is welcome, because I have been searching but I didn't find any solution yet.
Regards,
Jose
jose.gouveia
Member
217 Points
69 Posts
Re: Error Deploying Application in Azure Website
Sep 28, 2012 08:30 AM|LINK
Is this forum the most appropriated to ask about Azure related problems like mine, where a working Webmatrix deployed application fails a ajax call when executed on a azurewebsite?
Regards,
Jose.
jose.gouveia
Member
217 Points
69 Posts
Re: Error Deploying Application in Azure Website
Oct 01, 2012 10:44 AM|LINK
Hello all,
Does anyone knows why $.ajax({ is returning error on Azure, when it's working correctly on localhost and all Jquery references are local.
Regards,
Jose.
fiftytrini
Member
117 Points
18 Posts
Re: Error Deploying Application in Azure Website
Dec 07, 2012 02:11 AM|LINK
i don't know that this is an Azure problem. when I look at your code, it appears that you have an MVC application and are attempting to call a view page instead of the action. My ajax calls look like so:
$.ajax({ url: '@Url.Action("MyAction", "MyController")', dataType: 'json', type: 'POST', cache: false, data: { myParam1: myParam1, myParam2: myParam2 }, success: OnMyActionSuccess, error: OnMyActionError });sr. application systems analyst
please "Mark As Answer" if this post answers your question or addresses your issue.