I'm creating a Web Application in visual studio for an application.
On localhost, its working smooth, the problem comes when I port it to azure.
http://infolab.azurewebsites.net/api/users/getuserlist
This is the error I get in every single method of the API.
I've created a database in MySQL with MySql Workbench and used entityframework to implement his usage.
Any help?
Thanks
I was having what sounds like the same issue (Can't see the error on the link but my error was in regards to CODEFIRST/Entity issue), couldn't find answers anywhere that would work for me. After a day of trial and head slapping I came across a connection strings setting on Azure that I'd completely forgot I had set up.
Home > App Services > {YOUR APP} > Configuration
At the bottom of the page you'll find Connection Strings . If it is the same problem I was having you'll have at least one in the listings. This setting was overriding my connection strings in code and it was written in a code first format (no meta tag). I simply deleted the entry in Azure then re-published my code. Worked fine after that.
Connection String Section in Azure -> APP -> Configuration
Hope that helps somebody.
Related
I'm working on a .net Core MVVC project devloped in VS Community 2017 and using IIS Express 10 and I'm having issues with TempData not working on two of the 3 computers I develop on. At one point it did work on all three.
I use TempData to store info during redirects and then transfer TempData to ViewData to display on the View page. I had issues with something (I don't remember what it was now) and was getting help from a co-worker and during his troubleshooting a box popped up and said something about SSL and I don't remember what he clicked but since then TempData stopped working. The one thing I think he did do differently than me was along the top in the Debug area, he clicked the IIS Express dropdown and chose the project name option instead. TempData now shows up as null after the redirect. When I open up the project on my home computer, TempData works with no issues. I have a 3rd computer I do some development on and it used to work on that until the SSL box popped up on that as well and it stopped working. I'm guessing that it's redirecting to the page I want but it's making a pit-stop somewhere along the way and the data is lost.
I tried uninstalling and reinstalling both VS and IIS Express with no change. I also tried deleting the .vs folder in the solution with no change. I tried clearing out the websites using the IIS Express command in the command prompt. I also tried it in both Chrome (where it used to work) and Internet Explorer with no change. I've tried running it with debugging and without debugging with no change.
So, TempData no longer works on two computers (both Windows 10 if it matters) and my home computer (Windows 7) works just fine. Anyone have any ideas?
by close look to your question, at first
"a co-worker and during his troubleshooting a box popped up and said
something about SSL and I don't remember what he clicked"
mybe your co-worker enabled ssl on development environment and after run the project you have to trust local IIS certificate.
I think you have to config cookie for using SSL for example <httpCookies requireSSL="true" /> or you can disable SSL for development and every thing gonna be OK.
for sure you can check that in home computer your URL have HTTP and in other two computers the URL starts with HTTPS.
On the other hands I suggest you to compare the web.config structures.
I found the answer finally at https://github.com/aspnet/Mvc/issues/8233
To fix the issue, I modified my Startup.cs file so that app.UseCookiePolicy(); was placed after app.UseMvc();. I don't know why it only affects one of my computers but it fixes the issue.
I'm developing an Azure CosmosDB project and we are now in the testing/optimization stages but we are facing an issue which, so far, has remained unanswered by the official documentation or other sources.
Essentially, whenever we use the .NET SDK configured under DirectMode and TCP protocol we alway hit an error regarding "Service is currently unavailable" or "Resource not found".
However, as soon as we remove this configuration from the .NET SDK client everything starts to work as it should.
I've found a couple github issues on this (as this one or this one for example) but on any of them does my use case apply.
I'm testing from a locally deployed WebAPI fetching data from an Azure Trial Account.
The documentation mentions that ports 10000-20000 should be open. I've manually added that configuration as well (Azure side) but still no success.
Is there any issue using this? Does this only work from within the same network? What's wrong?
Thanks
I made an ASP.NET Web API project in VS2013 with one controller. The setup uses Entity Framework Code First.
When I run it locally, it works fine. But when I publish it to Azure Web App, calls to the controller will wait for a long time or returns an error An error has occurred.
I removed codes which work with DB and it works again.
The plan has 1GB of storage and I want to use it rather than paying for a separate database service.
How can I debug it to see what happens on the server with the database?
Thanks.
You can set your connection string in Azure control panel which will be used instead of one in your web.config.
You can also turn on error reporting in your web.config file to see if you are getting the 26 - Database not found error (connection timeout).
I am attempting to publish an Azure cloud service. Approximately 1 hour after beginning publishing, it returns this error. I am publishing through Visual Studio 2013 ultimate.
I am attempting to create a test Orleans-based service (not one of the samples). I have gone through the step-by-step cloud deployment tutorial and can't find anything that I might have missed. I would bet there is something in here though, like setting some connection strings wrong somewhere. I will be going through it again to make sure everything is as it is in the tutorial (unless there is an error there).
Also, I am using a mobile service as the API front end. There could be something in setting this up that's causing issue as well, as it differs from the samples I've looked at.
I think this usually happens when you create a new publish profile or in a slow internet.
Things you can try.
Restart Visual Studio
Sign Out and Sign in Again for your Azure Subscription.
Minimize your deployment Package Size
Disclaimer : I have not tried the 3rd point myself yet. Test in staging environment or UAT environment before trying this on production to avoid trouble.
Here's few things you can try:
Make sure the time stamp match on client and server.
Republish using publish setting you download from Microsoft Azure portal site.
When using Mobile Service, make sure you have 'X-ZUMO-APPLICATION: ' in your HTTP header.
Something you can try also is to check the size of all files uploaded and compare them with a "local" deploy. Maybe one or more files could be truncated.
In my case I think it was a slow upload speed that was causing that error when trying to publish directly from VS. I had then to do a Package and upload via the Azure portal and it worked fine.
I am trying without complete success to create a wso2 identity server on a windows server 2008 vm. I followed the online instructions and installed the pre-requisits (jre and jdk), downloaded the zip file, setup the environment variables, and ran the wso2server.bat file. There were a lot of errors.
I then realized I needed to add active directory role on the server, which I did. It still wouldn't install. I did some more online research which led me to believe I needed to install wso2 esb as well, which I did. I was able to get that install to work and was able to create a desktop app to consume the web services. All well and good. but then as part of the requirements they wanted to enable passive sts with an asp.net client (not really sure what that is), so I went back to the identity server and am still getting errors while running the bat file, though I an able to run the gui from the browser, but unable to log in.
The exception I am getting is :
TID: [0] [IS] [2013-10-07 10:34:58,746] ERROR {org.wso2.carbon.event.core.internal.builder.EventBrokerHandler} - Can not create the event broker {org.wso2.carbon.event.core.internal.builder.EventBrokerHandler} org.wso2.carbon.event.core.exception.EventBrokerConfigurationException: Can not access the user registry
in addition, I am also getting authentication errors on some of the esb web calls, but not all, and I would also like to know how to change from the default user store (ldap or ad or whatever it is) to sql server.
I have seen a few examples for doing it with mysql and oracle, but not sql server, specific product information is sometimes challenging to find.
Any help would be greatly appreciated.
Thanks. Mike