eclipse and websphere 8.0 - cannot change the context root - websphere-8

I have the IBM plugin for eclipse that allows me to develop on websphere 8.0 servers. I'm using eclipse (Juno Build).
Normally, in the project explorer, I can change the context root of an application simply by right-clicking >> properties >> Web Project Settings >> and setting the context root right there. I can literally set that context root to anything, and it doesn't change anything about it. When I check the admin console, it displays as being 'AppName', rather than anything I've set in the web project settings. That and I'm unable to change it right there in the console, since the only button I can click is "cancel". All the text fields are there for me to change it, but there's no save button anywhere...
Has anyone else had this issue? What did you do to fix it, if at all?

There are 2 places you can set a Context Root in WebSphere.
The first is in the module definition inside the application.xml file of the EAR (That file is not mandatory in WAS 8 but it is possible to use it)
The second is in the ibm-web-ext.xml file inside the WAR.
Is it important to keep in mind the application.xml settings override the ibm-web-ext.xml settings.
When you set the context root in the UI it is setting the ibm-web-ext.xml file, if you got another definition in application.xml you will see no change, as you experiencing.
My suggestion is, if you are using application.xml always set the context root there.

Related

How do you allow parent paths in Visual Studio 2015?

I've opened an existing web application project from Visual Studio 2013 (which runs just fine), in Visual Studio 2015. When I run it from within Visual Studio 2015 I get:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/blah/login.asp, line 1
The Include file '../includes/Security.asp' cannot contain '..' to indicate the parent directory.
My IISExpress applicationhost.config file already contains the entry:
<asp appAllowClientDebug="false" appAllowDebugging="false" errorsToNTLog="false" enableParentPaths="true" scriptErrorSentToBrowser="true" bufferingOn="true">
<session allowSessionState="true" />
<cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
<limits maxRequestEntityAllowed="1073741824" />
</asp>
My web application properties are set to use IISExpress.
What could I be missing?
The 'applicationhost.config' has moved and is now located in the hidden .vs folder. Make sure you're updating the right file.
Here is a much clear explaination although the accepted answer is in the right direction.
Since VS2015, IIS Express has changed where it picks up your applicationHost.config file. This is presumably to simplify the distribution of projects. It has moved away from the traditional C:\Users\<profile>\Documents\IISExpress\config\applicationhost.config folder (although this file will still exist on your computer to support older VS installations).
It is now located in the application project's root folder as a hidden file. To save you hunting for it, here is how you open it quickly and easily:
Right click IIS Express from the tray icon and select Show All Applications.
Click on the URL entry of your application. The "Path" and "Config" values then are shown as hypertext links further down in the IIS Express window.
Click on the Config hypertext to open on your preferred editor. (e.g. C:\<Path-To-Project>\.vs\config\applicationhost.config)
Hope this helps.
I wanted to add my version of a very similar answer because I still had to do some searching to get the expected end results. Although the original question just really wanted to know why the current config that was being used was not working and it was in fact explained in the accepted answer, it did not help someone like me coming into the question. I needed to know everything to do in order to achieve allowing parent paths when debugging. So here is my answer in detail...
How to configure the IIS debug server in Visual Studio 2015 to allow parent paths:
First you need to find the IIS Express tray icon.
Next you need to open the IIS config currently running for debugging by right clicking on that tray icon. You will then see the following context menu. You will need to click on "Show All Applications".
This will then show you the configurations of the IIS debug server you are running. There will also be the project you are working on listed in this list.
Click the projects name (in this case "Web") under the Site Name column. You will then see the Path of the project and the Config file being use to run the debug IIS server. You will then click on the Config path to open the applicationhost.config in your default text editor.
This will open up the config file you are using when debugging your project. You will need to scroll down until you find the <system.webServer> section. Then look for the <asp> section. In my case it was <asp scriptErrorSentToBrowser="true">.
Then you just need to edit the asp section to include enableParentPaths="True" as shown in the image below.
The just save the file and restart the debugging process. Note: I only had to hit F5 in the IE browser to see the change. I did not have to close the browser and restart the debug process over again.

Adding global.aspx file

I am currently using IIS to host a simple website, and would like to know how to enable the 'Global.aspx' file? I need to know where I would define it, as all the tutorials talk about using Visual Studio, which I am not using.
File Global.asax should be placed on the root directory of your site. There is nothing else to do besides adding required code, you put it there and just work.
Just right-click on the project name displayed in the Solution Explorer, and choose Add New..., then choose Global.asax from the list displayed in the new popup window. It goes to the root of your application.
Here is further information: Where is the Global.asax.cs file?

Rich text editor with standalone apps under Sitecore web root

I've been trying to configure a standalone ASP.Net application beneath a Sitecore web root (more or less as outlined here: http://sitecoreblog.alexshyba.com/2009/05/standalone-apps-under-sitecore-web-root.html). It's almost successful in that the virtual directory runs, but in the /sitecore folder, the rich text editor no longer works. Here is the error it throws:
'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager.
It works fine when I revert back to the original configuration.
Does anyone know how to properly configure this?
More info (1):
So, in the sitecore web.config, at the root, I added:
location path="." inheritInChildApplications="false" above the sitecore, system.webserver, and system.web nodes. The non-sitecore app I was attempting to run works great when I do this, but it somehow creates the Telerik.Web.UI.WebResource.axd I mention above, in the /sitecore folder, mostly when using the rich text box.
More info (2): This happens when I make these changes to the web.config in the sitecore root. While attempting to fix the problem, I did make a few changes to the web.config files in the /sitecore folder (including deleting them). but it made no difference. I've since restored the /sitecore folder to it's original configuration.
The standalone app is running as a separate app, immediately off the root, so: http://mysitecoresite/mystandaloneapp.
I had the same problem. After much searching, this fixed it for me (using v7.2 rev 140228): http://docs.telerik.com/devtools/aspnet-ajax/controls/scriptmanager/troubleshooting/overview#telerikwebuiwebresourceaxd-is-missing-in-webconfig-radscriptmanager-requires-a-httphandler-registration-in-webconfig
You have to set the EnableHandlerDetection property where it is declared on the Sitecore .aspx pages. I found it on EditorWindow.aspx and EditorPage.aspx.
<telerik:RadScriptManager ID="RadScriptManager" runat="server" EnableHandlerDetection="false"></telerik:RadScriptManager>

Toggle to switch "copy to output: always" for all .cshtml files

I've got a fubu mvc application that only works on local iis if my view files (.cshtml) are copy to output and set as resources (via the properties menu).
However, for them to be picked up on windows azure they need to be set as "copy to output: always" but not set as resources.
Is it possible to change this setting in code or powershell? So I can flip a switch before pushing to azure, then flip it back after?
I'm late to the party but the answer to your question is that .cshtml-files must be set as Build Action: Content under Properties. This is the default build action for MVC-views.
Copy to output directory should be set to Do not copy

Problem in flex project

I am using Adobe Flash Builder 4 trial version.
I created one abc.mxml application which is working fine in the IDE. Now, I want to use the generated abc.swf in one of my application so I copied
abc.swf
abc.html
and related .js and .css files
to some other location in the file system. After that when I tried to launch the abc.html in the browser, nothing was appearing in the browser.
After that I copied the whole flex project at some other location and tried to launch the same abc.html file. Even that was also not working.
I don't know what's the problem.
Edited ============================================================================
My money is on sandbox security issue. Either keep the files under bin-debug to prevent it or add your folder and flash file to be allowed in the Flash Security Settings.
This is cross-site scripting situation, read this: http://kb2.adobe.com/cps/142/tn_14213.html.
You launch abc.html (which consist adc.swf) from one domain ("file:///c: ..."), but refers for data from another (is there you red5 installed, probably localhost).
Create cossdomain.xml in the root directory in ther server (red5).

Resources