Tomcat deployment fails with error 403 - tomcat6

My tomcat deployment is failing every time with the following error:
403 Access Denied
You are not authorized to view this page.
This is my tomacat-users.xml:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager-gui"/>
<user username="bhaskar" password="bhaskar007" roles="manager-gui"/>
</tomcat-users>
I don't know what am I doing wrong in this case. Tomcat manager is allowing me to login but not to deploy. Please help as I am prestty sure that my deployment path is correct.

Related

Error when running a .net core web app with React.js on IIS 10

I have a web app based on .net core v2.1 with a React.js front-end, which I'm trying to host on IIS 10. The app runs fine via Visual Studio (2017), however when I publish the app and host via IIS, I get the following error:
Error image
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Error Code 0x8007000d
The web.config file was generated during the publish; I have not modified it:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\SkillsMatrix.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: ea8a300c-5bb6-4a29-a8d2-d13dddbbac1d-->
This same error happens if I start a brand new project via VS, do not add any code, and publish it to IIS...
I have tried:
Giving access to the folder/file to the IIS_IUSRS user group
Removing app.UseHttpsRedirection(); in StartUp.cs
Does anyone have any suggestions for how I can clear this error and host my app?
You could try the below steps to resolve the issue:
1)Make sure you download and install the .net core hosting bundle and runtime.
https://dotnet.microsoft.com/download/dotnet-core/3.1
2)Make sure that the Application Pool > Process Model > Identity is set to ApplicationPoolIdentity or your custom identity has the correct permissions to access the application's deployment folder.
3)Set the application pool set the .NET CLR version to No Managed Code:
4)Confirm that you have enabled the proper server role. See IIS Configuration.
you could the below link for more detail:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1

Either the access code is invalid or the OAuth token is revoked.Details: invalid _grant

I am working on Windows and tried the tutorial at https://cloud.google.com/appengine/docs/java/
That worked fine when I tested locally but when uploading it using
"mvn appengine:update" I get the following
"Either the access code is invalid or the OAuth token is revoked.Details: invalid
_grant
.'cmd' is not recognized as an internal or external command,
operable program or batch file."
The appengine-web.xml file looks like this
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>spline-1270</application>
<version>1</version>
<threadsafe>true</threadsafe>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
Any ideas on what is wrong here?
I want to mention that there was no browser opened to be invited to enter the credentials for Google account.
Thanks,
Sorin
I just found the solution: Delete the C:/Users/yourUser/.appcfg_oauth2_tokens_java". Then re-run mvn appengine:update. It will ask again for credentials.

Silverlight clientaccesspolicy.xml

We have Silverlight Application with RIA web service. URL: https://mysite.mydomain.com/services/mysitewebservice.svc
Also, we have a Sharepoint (SharePoint 2013) site hosted in separate domain. URL: https://mysharepointsite.mydomain.com
The Silverlight RIA service is called in SharePoint Silverlight Web Part.
I placed the "clientaccesspolicy.xml" file in the Silverlight root site (URL: https://mysite.mydomain.com/clientaccesspolicy.xml) and I can view this file in IE v11 browser. Compatibility view is ON.
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
But calling the service in SharePoint Site SL Web Part. an exception error still occurs.
"Load operation failed for query 'GetMyData'. An error occurred while trying to make a request to URI 'https://mysite.mydomain.com/services/mysitewebservice.svc/binary/GetMyData?category=sales'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details."
I read bunch of forums and articles but they all points to placing the clientaccesspolicy.xml in root site.
What is missing. Please help.

Tomcat 6.0.35 - how to bypass new CSRF protection on the manager application?

I have a command line script (actually a git post-checkout hook) that reloads my Solr application by doing a cURL to:
http://localhost:8080/manager/html/reload?path=/solr
Since I upgraded to Ubuntu 13.04, it now fails, where it used to work before the upgrade.
The cause of the problem is that my newer version of Tomcat (6.0.35), has some new CSRF protection and it now returns 403 Access Denied.
How can I solve the issue and bypass the CSRF protection?
More info:
My /etc/tomcat6/tomcat-users.xml file:
<?xml version='1.0' encoding='utf-8'?>
<role rolename="manager"/>
<user username="tomcat" password="secret" roles="manager"/>
</tomcat-users>
The documentation for Configuring Manager Application access in tomcat mentions some new manager roles, however my error specifically mentions that the single "manager" role still exists for the moment (and I tried the other roles anyway without success).
(As I was writing the question, I found the answer.) Instead of cURLing to the HTML application, I needed to cURL to the "plain text interface".
i.e. instead of
http://localhost:8080/manager/html/reload?path=/solr
Use:
http://localhost:8080/manager/reload?path=/solr
It turns out:
The HTML interface is protected against CSRF but the text and JMX interfaces are not.
This fits with the new role called "manager-script". To ensure my app will work in the future I changed my /etc/tomcat6/tomcat-users.xml file:
<?xml version='1.0' encoding='utf-8'?>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="secret" roles="manager-gui,manager-script"/>
</tomcat-users>

GAE - Unable to update: com.google.appengine.tools.admin.HttpIoException:

I tried to upload my test gwt app but I've just faced a quite strange error. Every time I try to upload app I get this:
Unable to update app: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
See the deployment console for more details Unable to update app:
Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
... console says this
Skipping GWT compilation since no relevant changes have occurred since
the last deploy. Created staging directory at:
'C:\DOCUME~1\1\LOCALS~1\Temp\appcfg4973998929980348825.tmp' Scanning
for jsp files. Scanning files on local disk. Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to
URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
Debugging information may be found in C:\Documents and
Settings\1\Local Settings\Temp\appengine-deploy1308974562331110258.log
... and error log says this:
Unable to update: com.google.appengine.tools.admin.HttpIoException:
Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
at
com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:281)
at
com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:234)
at
com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:213)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:606)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:414)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:122)
at
com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:328)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:52)
at
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:265)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:144)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I just updated GAE from 1.5.2 to 1.6.2 but the error keeps going :(
How to fix it?
Well... I had to make my own research of this kind of problem deeper on...
So I guess I finally found the problem root :S The thing is in my app version syntax;
My appengine-web.xml file was containing
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>gwttestapp001</application>
<version>1.0</version>
</appengine-web-app>
... but according to tutorial I found the thing is "there is no way to use dots" in version spelling so I changed the content to
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>gwttestapp001</application>
<version>1</version>
</appengine-web-app>
... and all uploaded successfully :)
I hope that tip saves ones day
Solution to this can be like, as it worked for me:
properties starts
<appengine.app.version>10</appengine.app.version>
<appengine.target.version>1.8.7</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
properties ends
configuration starts
<version>${appengine.app.version}</version>
configuration ends
In configuration label, write version as that in properties label as above. Hope this will help.

Resources