AppManagementServiceApplication throws "Microsoft SharePoint is not supported in 32-bit process." when registering hosted app on site - sharepoint-2013

I'm on SP 2013 enterprise single server dev machine
I have prepped SP to host a remote on prem hosted app.
I navigate to /_layouts/15/AppRegNew.aspx and enter the App Id, Secret, etc and hit create ... error ID 3 and 1309 are thrown:
ID 3 is:
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/1660113
Exception: System.ServiceModel.ServiceActivationException: The service '/9fabc3ed921a42739ebeb5576c6b4e6a/AppMng.svc' cannot be activated due to an exception during compilation. The exception message is: Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.. ---> System.PlatformNotSupportedException: Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable.
followed by 1309:
Exception information:
Exception type: ServiceActivationException
Exception message: The requested service, 'http://servername:32843/9fabc3ed921a42739ebeb5576c6b4e6a/AppMng.svc' could not be activated.
The app management and subscription services are started and running. I have a valid trust setup.
Thoughts?

In IIS there were app pools that had enable 32-bit set to true, so I set it to false and was enable to register the app.

Related

Could not load type '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'.

New Windows server 2012 R2 installation, added ASP.Net and .Net 3.5
Getting following error when trying to browse web service file svc:
Could not load type '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'.
Any thoughts?
Open command prompt as administrator
Navigate to C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation
and execute the command:
ServiceModelReg.exe /i
Navigate to c:\windows\Microsoft.NET\Framework\v4.0.30319
and execute the command:
aspnet_regiis -iru
Some roles and features are required on the server
enable server role "Internet Information Services", all underlaying services will be included
enable feature "HTTP Activation", this both under .NET framework 3.5 and .NET framework 4.5
In IIS make sure there is a "handler mappings" configured for the "*.svc" files
That error message turned out to be a bit of a red herring when I encountered it. I simply didn't have a HEAD route setup in WebApiConfig and was getting hundreds of HEAD requests per day. So, if you've verified that you have all the necessary Windows Features installed, then next check that you have default routes setup for each HTTP request method.

Click once application to connect to remote server

I have added this question on ServerFault but no one replied.
I have a .net application which calls a webservice deployed on my local windows server 2012 on IIS, and the sql server database resides on that server too. All employees connect to the same service and DB since we're all on the same domain, and I publish the app and webservice to the server through visual studio (2012).
Now I need to make employees access this application when they are outside the company's network, so I deployed the webservice on IIS on one of our remote windows 2012 servers, I created a public shared folder in my remote server and added to app webservice files to it and in visual studio I changed the publish method to web deploy and filled in the information as below:
Server: https://x.x.x.x/
Site Name: https://x.x.x.x/PublicFolder
Destication URL: https://x.x.x.x/PublicFolder/Application
When I click Validate Connection, it fails with the following message:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
Note that I tried to replace https with http and I got another error:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
the remote server returned an error: (401)Unauthorized
I went to the previous link and I did what they suggested:
Create a separate user group MSDepSvcUsers on remote computer.
Create an local account A on both local & remote computer.
Add A to MSDepSvcUsers on remote computer.
Use account A to publish, this will allow you to publish without
needing to use built-in admin account.
but the same error (NOT_ADMIN) remained
UPDATE: I found another possible solution:
Add/modify windows registery key
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\”
and set it “1”.
After I added this registry key, the error changed to:
site 'http:' does not exist ... #ERROR_SITE_DOES_NOT_EXIST
So now if I put wrong credentials, I get the unauthorized error, if I use correct credentials I get side does not exist error.
What should I do?
It worked!!
I mean the connection, it's now validated, all I had to do is change site name from "http://x.x.x.x/PublicFolder" to "Default Web Site\SiteName" !!
This was really confusing, finally got it!

Error 0x80070585 when running Fastcgi with IIS 8 + Python 3.4 + Django 1.8 + Windows Server 2012

I am trying to set up IIS 8 with Django 1.8.3 using Fastcgi and Python 3.4. I followed this tutorial with the following Environment Variables:
DJANGO_SETTINGS_MODULE -> value: FirstSite.settings
PYTHONPATH -> value: C:\inetpub\wwwroot\Django\FirstSite
WSGI_HANDLER -> value: django.core.wsgi.get_wsgi_application()
I changed the WSGI Handler value from django.core.handlers.wsgi.wsgihandler() to django.core.wsgi.get_wsgi_application() because the tutorial talks about a previous Django version.
I followed everything in the tutorial, and as I try to open the website on my IE browser in Windows Server 2012 R2 I get the following error:
Keep in mind 8003 is the port I configured as the tutorial showed.
HTTP Error 500.0 - Internal Server Error scriptProcessor
could not be found in application configuration
Most likely causes: •IIS received the request; however, an internal
error occurred during the processing of the request. The root cause of
this error depends on which module handles the request and what was
happening in the worker process when this error occurred.
•IIS was not able to access the web.config file for the Web site or
application. This can occur if the NTFS permissions are set
incorrectly.
•IIS was not able to process configuration for the Web site or
application.
•The authenticated user does not have permission to use this DLL.
•The request is mapped to a managed handler but the .NET Extensibility
Feature is not installed.
Things you can try:
•Ensure that the NTFS permissions for the web.config file are correct
and allow access to the Web server's machine account.
•Check the event logs to see if any additional information was logged.
•Verify the permissions for the DLL.
•Install the .NET Extensibility feature if the request is mapped to a
managed handler.
•Create a tracing rule to track failed requests for this HTTP status
code. For more information about creating a tracing rule for failed
requests, click here.
Detailed Error Information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler Django Handler
Error Code 0x80070585
Requested URL http://127.0.0.1:8003/
Physical Path C:\inetpub\wwwroot\Django\FirstSite
Logon Method Anonymous
Logon User Anonymous
More Information: This error means that there was a problem while
processing the request. The request was received by the Web server,
but during processing a fatal error occurred, causing the 500 error.
View more information »
Microsoft Knowledge Base Articles: •294807
Is there any way to fix this error? Are there any extra steps for Python 3.4?
Found my error. The Handler Mapping Executable argument was pointing to fastcgi.py instead of wfastcgi.py

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040005

I am getting the below mentioned error when my web service tries to open MS word document pragmatically through my .net web service. When I run web service through visual studio, it works fine but when I deploy web service on IIS 7, I get the error
Retrieving the COM class factory for component with CLSID
{000209FF-0000-0000C000-000000000046} failed due to the following error: 80070005
Access is Denied
at the following line.
Microsoft.Office.Interop.Word.Application oWordApp = new Microsoft.Office.Interop. Word.Application();
Microsoft.Office.Interop.Word.Document oWordDoc = new Microsoft.Office.Interop.Word.Document();
I have written this code in server side. It has to open the word document template and find and replace some values and save as with different name
Im using 64-Bit system and Office 2007. Can any 1 help me to fix out the problem.
I was just getting this error and it was solved by adjusting the permissions in the DCOM config on the server:
Click Start -> Run -> dcomcnfg
Expand Component Services -> Computers -> Right click My Computer -> Properties
On the COM Security tab click Edit Defaults under Launch and Activate Permission
Add both Network Service and IIS_IUSRS with local launch and local activation
No reboot should be needed for this. If your app pool is running under a different user, add that user instead.

402.2.1260 IIS7 Windows Server 2008 R2 Web Service

I have a 3rd party webservice that runs by posting a soap message directly to a dll.
It runs perfectly on my development machine, but when I try and deploy it to Windows 2008 R2 64-bit using IIS 7 it fails, indicating error 404 2 1260 in the IIS7 log.
I have done all of the normal stuff, including:
Setting the ISAPI and CGI Restrictions,
Adding the Handler Mappings and setting them to Execute,
Setting Handler Mappings Feature Permissions to Execute
but none of that helps.
When I enable Failed Request Logging, the lowest-level detail that I can get is:
Error Code 0x800704ec
Error Code 2147943660
Error message IsapiModule This program is blocked by group policy
What is going on!?
The DLL was a 32-bit DLL.
By default, IIS 7 running on Windows Server 2008 R2 64bit doesn't allow 32bit dlls to run.
There's a little setting in the Application Pool Advanced Settings called Enable 32-Bit Applications. Set it to True in the application pool to which your web service belongs, and it should start working!