Coldfusion same file different output on CF10 and CF11 using cfheader - coldfusion

I have this simple code in Coldfusion
<cfheader
statuscode="400"
statustext="There was something wrong with the request."
/>
<cfoutput>This is what I want to return as the output.</cfoutput>
<cfabort>
When I run this on my localhost running CF10, I get this output on my Chrome browser:
But when I run this same file on another server running CF11, I get this output:
Am I missing something? Is there some other way of doing this in CF11?
Any help would be really appreciated. Thanks.

The issue actually has nothing to do with ColdFusion, either 10 or 11.
By default, IIS shows not does not show the statustext portion of the error message; it only shows the statuscode number. This is a security feature to prevent data leakage. If you do want to show the statustext portion of the error message, that is called "Detailed Error Messages" in IIS.
Steps to enable Detailed Error Messages in IIS 7:
Open the IIS7 manager
Select the Website and on its features view, double click on "Error Pages".
Right click and select the "Edit Feature Settings…" or select the same from the Actions pane (in the right hand side)
Select the "Detailed errors" radio button and click on OK
Now, even your client browsers will be able to see the detailed error messages.
More information:
https://blogs.msdn.microsoft.com/rakkimk/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers/
https://www.iis.net/learn/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis

Related

Server home is not valid for ColdFusion10 in CF Builder

Today when I was trying to configure my ColdFusion10 Server with the ColdFusion Builder 2, It shown me a error message like "Sever home is not valid", Screenshot:
I can not move forward both the "Next" and "Finish" button is disabled and showing the error message.
Can anyone please suggest me which path I should provide ?
As per your comment above: you've selected "JRun" as your application server, but ColdFusion 10 runs on Tomcat. That'll be your problem.

Unable to View Undelievered Mail in CF Administrator

When I go to the Mail option in CF10 and click the "View Undelivered Mail" button I am getting following errors:
Error retrieving markup for element mailBody : Client verification
failure. [Enable debugging by adding 'cfdebug' to your URL parameters
to see more information]
Error invoking CFC /CFIDE/administrator/mail/undeliveredmail.cfc :
Client verification failure. [Enable debugging by adding 'cfdebug' to
your URL parameters to see more information]
Does anyone have any idea why am I not able to see Undelivered mail?
Try deleting any ColdFusion related cookies in your browser, such as CFID, CFTOKEN, CFAUTHORIZATION_cfadmin and CFADMIN_LASTPAGE_ADMIN, and then restart your browser.
Look for an 0-byte file named something like "Mail4117192657238440155.cfmail" in your /Applications/ColdFusion10/cfusion/Mail/Undelivr folder and delete it. That fixed the problem for me.

Login error to Sharepoint 2013 repository using openCMIS Workbench

using the OpenCMIS Workbench 0.8.0, I can load the sharepoint 2013 (GA) repositories fine but get the following error when I try to login to one of the repositories such as Documents:
"Invalid Argument: One or more of the input parameters to the service method is missing or invalid"
Found a blog with some instructions but those didn't work for me:
http://dhartford.blogspot.com/2013/01/sharepoint-2013-w-apache-chemistry-cmis.html?showComment=1359398536275#c6910049622927723676
Note: Here is the service url format that I am using:
http://myserver.xxx.com/MYSITE/cmis/_vti_bin/cmis/rest?getRepositories
Does anybody know what the problem is?
Here is the stack trace from Workbench:
> 11:05:17 DEBUG ncmis.client.bindings.spi.http.HttpUtils: GET http://MYServer/_vti_bin/cmis/rest/f8134afe-176a-4c48-9fd2-a9f97e5dc91d?getTypeDefinition&typeId=cmis%3Adocument
> 11:05:17 TRACE ncmis.client.bindings.spi.http.HttpUtils: GET http://MYServer/_vti_bin/cmis/rest/f8134afe-176a-4c48-9fd2-a9f97e5dc91d?getTypeDefinition&typeId=cmis%3Adocument > Headers: {null=[HTTP/1.1 400 One or more of the input parameters to the service method is missing or invalid.], Server=[Microsoft-IIS/7.5], SPRequestDuration=[124], SPIisLatency=[27], X-FRAME-OPTIONS=[SAMEORIGIN], Content-Type=[plain/text; charset=utf-8], Date=[Wed, 30 Jan 2013 19:05:02 GMT], X-SharePointHealthScore=[1], Cache-Control=[private], X-Content-Type-Options=[nosniff], X-Powered-By=[ASP.NET], X-MS-InvokeApp=[1; RequireReadOnly], request-id=[5ef0f99b-24ec-909f-6192-6eaf6feccabc], Content-Length=[167], MicrosoftSharePointTeamServices=[15.0.0.4420], SPRequestGuid=[5ef0f99b-24ec-909f-6192-6eaf6feccabc], X-AspNet-Version=[4.0.30319]}
> 11:05:17 ERROR hemistry.opencmis.workbench.ClientHelper: CmisInvalidArgumentException: One or more of the input parameters to the service method is missing or invalid.
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: One or more of the input parameters to the service method is missing or invalid.
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:821)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:88)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:137)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:518)
at org.apache.chemistry.opencmis.workbench.model.ClientSession.createOperationContexts(ClientSession.java:244)
at org.apache.chemistry.opencmis.workbench.model.ClientSession.createSession(ClientSession.java:195)
at org.apache.chemistry.opencmis.workbench.LoginDialog$2.actionPerformed(LoginDialog.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2006)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2329)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:398)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247)
> 11:05:17 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
Another thing that I noticed is that none of the URLs from the service document work when I use them from a browser. So i think the service doc doesn't have valid urls.
Give the latest CMIS Workbench a try:
https://repository.apache.org/content/repositories/orgapachechemistry-166/org/apache/chemistry/opencmis/chemistry-opencmis-workbench/0.9.0-beta-1/chemistry-opencmis-workbench-0.9.0-beta-1-full.zip
Didn't have the time to post the solution but here is basically what I had to do after getting help from Microsoft. I was missing Step B below:
A. Activate the CMIS feature for your sub site
Go to the Sharepoint 2013 Central Administration
Click on the Sites link and then click on your sub site. Or navigate directly to it. eg http://myserver/mysitename
Click on the Settings icon (gear top right) and then select Site Settings
Under Site Actions, click Manage Site Features
Click Activate for the CMIS producer.
B. Check Alternate Access Mappings
Go to the Central Administration page
Under System Settings, click Configure Alternate Access Mappings
There should be at least two urls. One with server short name and one with server full name.
If the url is missing, click Add Internal Urls
For the Alternate Access Mapping Collection, click the No Selection link, change and select:
SharePoint - 80
Set the url such as http://myserver.usa.com (full domain name)
Set Zone: any such as Intranet
Click Save
My suggestion would be to:
start the Workbench, do not login yet
close the connection popup
open the Log window with the button on the top right corner
increase the log level to DEBUG or more verbose
try to connect
check the logs again, possibly posting them here
The actual root of the problem turned out to be a missing Alternate Access Mapping. Not sure why it was missing in the first place.
So I added an internal url that has the full server name address instead of just the short name. A microsoft dev helped me figure this out.
Remove any proxy settings from internet explorer before you launch OpenCMIS, also reset any system wide proxy settings: netsh winhttp reset proxy
Make sure your share point web app is set to accept only basic authentication as described in the blog post you mentioned
Removing the proxy from IE and system wide fixed my problem .. I can now login to sharepoint 2013 using OpenCMIS
ah before i forget the URL syntax should be http://server:port/_vti_bin/cmis/rest/?getRepositories
Good luck

ksoap2 - SoapObject 'source not found'

I have a code for the BlackBerry App where the "login" button is clicked to fetch xml data. However nothing turns up when I try to show the response returned from the webservice that accepts username and password. My MDS is selected and the browser shows the internet to be working. However I do not see any disable registration option in the debugger configuration window as some posts suggest. My problem is how to get the server response. In the simulator debug console, no System.println msgs are showing up. Debugging line by line, when it comes to the code
SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
debugger produces the error "Source not found". My focus has actually shifted from getting the server response to actually fixing the path to ksoap2 as it appears not to be found. Any tips on this? Thanks

How to get an error message out of my webpage

I have a web page that when I run it on a remote computer I get the message saying that remote errors cannot be viewed
When I go to view it on my web server machine, I get a message saying:
Internet Explorer cannot display the webpage
• Most likely causes:
• You are not connected to the Internet.
• The website is encountering problems.
• There might be a typing error in the address.
What you can try:
Check your Internet connection. Try visiting another website to make sure you are connected.
Retype the address.
Go back to the previous page.
I can get to google fine, so it is not the internet connection.... But this message gives me nothing to work on. How can I get more info as to why my page is not working?
I tried going to IIS Mananger and right clicking on the site and selecting browse. But my site is an HTTPS site so that does not work.
Any ideas would be great.
The quick and dirty fix would be to edit the web.config of your ASP application like that error message says so that you can see what the error is on Remote Machines. I would also check the Server logs to see if anything has been reported there.
Make sure there is a customErrors tag with the mode attribute set to "Off"
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Remove this through in production, because you don't want outsiders to see these error messages and get information about the workings of your application, which is a security risk.
UPDATE
As for your error on your local IE make sure that the option
view friendly http error messages is disabled. In IE8 it is under:
Tools > Internet Options > Advanced
This might fix the problem of IE showing that cryptic message.
Try to run that same code locally. You can write a log on exceptions. and can view that log. These are disabled on such servers for security of your website.