we have an domain for example www.testdomain.com.I have created a web application with the name newapplication and hosted like below
ie(www.testdomain.com/newapplication/default.aspx. its working fine.. again i created another webservice named newapplication2 and hosted like www.testdomain.com/newapplication2/service.asmx am facing the problem and getting the below error .As per my understanding
its not possible to host multiple asp.net application under single domain(www.testdomain.com)
correct me if am wrong.. and suggest some ideas how to acheive this?
Dev.
Related
I have a Blazor Wasm application with a Client and a Server project. The Client gets is data from the Server by using an api-call. However, when I publish the application to Azure it doesnt work.
Running in Visual Studio:
https://localhost:{number}/api/Project/GetAll returns the expected json.
Published in Azure:
https://{website}.azurewebsites.net/api/Project/GetAll returns the content of the index.html
I think it has something to do with routing but I cannot figure it out.
Note: when I run the project in Release-modus (which accesses the database in Azure) it works as expected.
Thanks for any help!
I recently just deployed a web app in Azure App Service. This web app uses 2 separate database (2 connection strings) to be able to function fully. Upon deploying and browsing the web app, the first database got automatically created but the 2nd one was not. I was expecting for both to be automatically created but I can't make it happen for the 2nd database.
I checked the connection strings and it is correct. What do I need to so the 2nd database gets created as well?
EDIT:
Code was requested but I am not really sure what relevant code I need to post. This is the only thing I can think of that might be involved in the database creation.
in ConfigureServices:
services.AddDbContext<FirstDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("FirstConnection")));
services.AddDbContext<SecondDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("SecondResourceConnection")));
Not sure if this is the correct code I need to post relating to this.
EDIT 2:
One thing to note is that this worked in my local, both DBs were created.
I'm trying to get the current IIS application name in my ColdFusion scripts but I have no idea where to get this information. I want to use the app name to communicate with IIS using cfexecute by running appcmd.exe.
<cfexecute name="c:\windows\system32\inetsrv\APPCMD" arguments="add site /name:#arguments.sitename# /bindings:""http/*:80:#arguments.binding#"" /physicalPath:""#arguments.physicalPath#""" timeout="60"></cfexecute>
The problem is that I can't be sure what the app name is. I could save it somewhere in a db but i'd really like to get it dynamically so the script can run without configuring the appname. If I could be able to fetch it from somewhere (or maybe based on the current hostheader) I could dynamically fill
/name:#arguments.sitename#
I've tried to search how to do this by using PHP and JSP examples, but so far, i haven't been able to find any method on getting the app name.
Following on from #Miguel-F's link (http://www.iis.net/learn/get-started/planning-your-iis-architecture/iis-7-and-iis-8-configuration-reference) in the comments above, there's a file in %windir%\system32\inetsrv\config\ called applicationHost.config that you could read in - this file contains the collection of sites that's configured in IIS. Is that the sort of thing you're after?
I am newbie in Azure development ,I am migrating an existing asp.net application to be hosted as cloud service ,everything works just fine locally (on dev. AppFabric) but when I publish it on cloud and after I try to singin on my signin.aspx page it keeps giving me "This webpage is not available" error .
after that refreshing the page gives me "HTTP Error 503. The service is unavailable." error
my signin page does a lot of stuff (calling db procedure ,setting user session) before redirecting to default page [I am using the free azure trial account]
what may cause the problem ,how can I debug ,why everything works fine on the emulator ?
Checking the event Viewer I found that the problem was in "Debugger.Break ();" inside a class it seems like that line just freaks the runtime out and causes it to lose control and recycle the Application Pool and stopping the service !!!!
You should set up a remote desktop connection to your web role instance and look at the Event Log for IIS. You will want this for development and testing independent of your current issue.
Links:
http://www.windowsazure.com/en-us/develop/net/common-tasks/remote-desktop/
http://msdn.microsoft.com/en-us/library/windowsazure/gg443832.aspx
I'm developing a SharePoint Timer Job to geocode some lists of addresses held on our SharePoint site.
I'm using code based on this MSDN sample to do the actual Geocoding request.
The problem I get is that when I call the service from SharePoint 2010 (running locally) I get a 401 unauthorised error in return.
Interestingly, I have also created a small winforms application which does the same thing (but without SharePoint/IIS) using the same code which works perfectly.
I'm setting the credentials the same way on both apps as follows:
request.Proxy.Credentials = CredentialCache.DefaultCredentials;
I'm an enterprise user and I'm using the same key on both apps - but one works and one doesn't - any ideas why this might be? Is it something i need to set in IIS perhaps?
I tried setting Pipelined = false on the request which was a suggestion I read about on but that didn't seem to work.
Any suggestions gratefully accepted.
Looks like you solved it by changing the identity of the application pool.
The other way to do it is to say that the web service call should be made using the identity of the user that sent the request to SharePoint. To do that try something like:
using (((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate())
{
WCFTestService.ServiceClient myService = new WCFTestService.ServiceClient();
Response.Write(myService.GetData(123) + "<br/>");
myService.Close();
}