"the rpc server is unavailable" when trying to do some process on local html file with autohotkey - automation

I have written the script that accesses the local HTML file and does some job.
^+A::
;Convert HTML TO ASCIIDOC
Send ^c
copied := Clipboard
sleep 30
local := "file:///C:/Users/emre/Desktop/Tools/Note%20Taking%20Tools/Asciidoc%20Tools/HtmlToAsciidoc-master/to-asciidoc.html"
sleep 100
(pwb5 := ComObjCreate("InternetExplorer.Application")).Visible:=False
pwb5.navigate(local)
while pwb5.busy
sleep 15
WinActivate,ahk_class IEFrame
ControlFocus,ahk_class IEFrame
Send, !n
Send, {Enter}
pwb5.document.getElementByID("source").value=copied
pwb5.document.getElementByID("conversion-button").Click()
Sleep 3000
Clipboard=pwb5.document.getElementByID("target").value
Return
When I run this script I get following error:
I have done some research and try following things but neither of these work.Any advice appreciated.
Check 1
I have checked DCOM Server Process Launcher, Remote Procedure Call (RPC) and RPC Endpoint Mapper from services.msc.All their status is Running and their startup is set to Automatic.
Check 2
I have also checked "Remote Assistance" from Firewall
Check 3
I have also checked that "File and Printer Sharing for Microsoft Networks" and "Internet Protocol Version 6 (TCP/IPv6)" are enabled
Check 4
I have also checked "to switch the NIC from the default "NAT" to "Bridged Adapter" from Virtualbox settings.

MAYBE this will help. My issue sounds similar to yours. In my case, I have a vb.net program, part of which does something to the effect of the following:
Function LoadWebPage(i_IE As SHDocVw.InternetExplorer, i_URL As String) As Boolean
i_IE.navigate (i_URL)
Debug.Print (i_IE.ReadyState)
End Function
The navigate method ran fine. But once it got to the point of returning the ReadyState property, I was getting the "RPC Server is unavailable" error. This was only happening on one of the three machines I was using. On the machine with the problem, I ran through the steps (which I saw listed in many other sites as well) you mentioned in your question, with no improvement. But then I came across a suggestion to adjust the "Internet Explorer Options-->Settings-->Security-->Enable Protected Mode". Actually the site that helped me said to make sure that they are checked for all of the zones (i.e., Internet, Local intranet, Trusted sites, Restricted sites). Actually it was unchecking them all that resolved my issue. I went back to one of the other two machines (one of those where the script was running without error), and indeed, they were unchecked on that machine (not sure yet about the 3rd machine).
Fix for RPC Server Error when occuring with attempt at Internet Explorer Automation
In case that post doesn't outlast this response, their stated reason for this issue:
"The basic gist of it is when you cross a security domain (http to
https) the sandboxing system actually creates a new IE COM
object...The basic solution is to set all of the security modes in the
Security tab of Internet Settings to 'protected mode enabled'(sic) to
avoid losing COM objects."
Again, I think that may have been a typo on their part and that they meant that the boxes should be unchecked.

Related

Persits ASPPDF ImportFromUrl ServerXMLHTTP Error: The request has timed out

We have a test website that uses Persits ASPPDF to build a PDF using the ImportFromUrl method. It works fine on our test domain, but when I use the same code on another domain (and crucially perhaps, a sub-domain) I get the "MSXML2::ServerXMLHTTP Error: The request has timed out." error.
This leads me to think its related to the problem outlined in
https://support.persits.com/show.asp?code=PS080709171
"the calling Active Server Page (ASP) should not send requests to an ASP in the same virtual directory or to another virtual directory in the same pool or process. This can result in poor performance due to thread starvation."
So perhaps the config of the two servers hosting the two sites (test and live) are different - and if so what would that be? - Or you can't run this method on a sub-domain? Any guidance out there please?
I've had the same issue for weeks and finally found out what the problem was. In my case, it was because I had set to True the options that allow the debug of classic ASP code, without which I could not debug using visual studio. Setting those options back to False fixed the issue.

"Command timed out waiting for send" in WindowsPhoneTestFramework

a couple of questions:
1.When I open an app in the emuhost commandline, I can open, close, install, uninstall it, but I can't interact with it (tap on something etc.), it says:
Next action?
invokeTap HitThisButton
-> Command timed out waiting for send
WCF command messages ->: Timeout
invokeTap:False
Even the ping says Active: False. Any ideas?
2.The doFlick command is commented out due to something with Nokia Music. Why is it so? Is it safe to uncomment the code now?
3.It says in the docs that you can add multiple targets. But in VS, the target device is a dropdown menu, and I've looked in the csproj file, and there is no device field in there. How do you add multiple emulators/devices?
Thanks
As seen on another site, the problem indeed lies in the hostname ending with .net ("bla.bla.net:8085"). I've worked around it by entering the hosts IP address directly in this file, line 81.
If anybody knows why it is bad for the hostname to end in .net, that would be marvelous.

PUT Stream 0 Bytes

I am using Windows Explorer to test the WebDAV implementation I am adapting to our system. The implementation is using IIS Express and is launched by Visual Studio 2013. I turned off Windows Explorer's requirement for SSL with WebDAV so I can test basic authentication (which works).
The problem I am having is with the Write method of the DavFile implementation. I connect to the web folder, navigate to a sub folder, then attempt to copy a JPG file from a folder on my computer's hard drive, into the WebDAV sub folder (using Windows Explorer).
The attempt to copy up a file (854kb) fails. When I set a break point, I notice that the "segment" stream (one of the input parameters on the "write" method, shows 0 (zero) bytes length.
Any tips on how to debug this problem? What is the most likely cause of 0 byte in the stream?
Here are some ideas about how to understand what is going wrong:
Examine the server log for exceptions. By default it is called WebDAVLog.txt and located in \App_Data\WebDAV\Logs\ folder. Are there any exceptions in it? Check your server log and make sure all requests were successful.
Examine WebDAV requests with a Fiddler tool or any other debugging proxy. While all requests that reached the WebDAV server Engine are logged, if the request failed before hitting the Engine you will not see it in a log. Usually this happens if the request failed during authentication stage.
Note that to capture requests using Fiddler on 'localhost' you must use 'localhost.fiddler' instead of 'localhost' when connecting to server, for example: http://localhost.fiddler:1234.
Exclude any client side issues. Finally there could be issues with client software that you are using, including with Microsoft miniredirector. Try to access server from any other machine. To get the idea if the problem is on the client or server side try also to reproduce the issue on ajaxbrowser.com.
You can post a part of the WebDAVLog.txt or fiddler log here or send it to IT Hit, it may give the idea of what is wrong.

Search broken in SharePoint 2010

Search in SharePoint throws an error, NullReferenceException, whether using the Search box on a normal page or even just loading the Advanced Search page.
I was originally getting System.ServiceModel.ServerTooBusyException and Round Robin Service Load Balancer EndpointFailure errors in the SharePoint ULS logs whenever I tried to search. I examined IIS and determined that the Web Apps existed. I stopped and started the Search Query and Site Settings Serviec on the server. That was the last I saw of the EndpointFailure and ServerTooBusyException errors.
However, a new error showed up. This time is was a System.NullReferenceException from SetPropertiesOnQueryReader() at CoreResultsWebPart.OnInit(). KB Article 976462 looked promising, until further research showed that it adds the AllowInsecureTransport property in the SecurityBindingElement class, and changes the value from its default of False to True. However, this property exists and is already set to True in my environment.
I found this same problem, however deleting the Search Service Apps and Proxies, recreating them and performing an IISRESET did not fix my problem.
When the Advanced Enterprise Search page is brought up, an error is returned to the screen: Object reference not set to an instance of an object.
This is the log entry out of the ULS:
CoreResultsWebPart::OnInit: Exception initializing: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)
Internal server error exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)
Can you have a look at your search topology? Check the status of the following components:
Administration Component
Crawl Component
Query Component
It should be on-line. If it's not, click on Modify Topology and re-provision it.
Navigate to centraladmin:port/_admin/FarmServers.aspx, and check the status of your servers. It should say No action required for all servers - if it says Upgrade required, then run the product and configuration wizard on WFE and app servers depending upon your SP servers.
There may be some rogue entry in your config DB which may be causing this. As you have already re-provisioned search there may be some orphan DB causing the issue. Navigate to centraladmin:port/_admin/databaseStatus.aspx. If you don't see old orphan search DBs here, please delete the search service application, access the above URL again and check if its there. If it is then run the following PowerShell command to remove orphan DBs:
$orphanedDB = Get-SPDatabase | where{$_.Name -eq "MySearchDatabase"}
$orphanedDB.Delete()
I had a similar problem and following Vinod's answer noticed that the "Search Alert Status" in Search Administration was disabled (I intended it to be). Enabling it fixed the issue, meaning that the search pages now render. I was then able to disable the "Search Alert Status" again and the pages continue to work fine.
Hope this helps someone else before they reset / restart services as suggested elsewhere on the web.
I got the same error, restarting SharePoint server fixed my problem.
I just encountered the same problem, and fixed it by:
I verified that the SharePoint Web Services site existed in IIS, and that SecurityTokenServiceApplication existed as a virtual directory.
In my case, I found that the application pool that powered it was stopped due to bad creds. I fixed the creds, bounced the pool, and bounced the site.
That still didn't resolve the issue, so I moved into Sharepoint Central Admin, went to Application Management -> Manage Service Applications.
I clicked on Search Service Application and created a new crawl for my local sites, and did a full index.
Finally I clicked through all of the pieces in the search application topology, changed nothing, but applied topology changes when I was done.
That combination of things fixed it for me.

WCF with SSL- not finding localhost

I'm trying to get WCF to use SSL with ANYTHING for FIVE DAYS now. I've gone through countless walkthroughs, generated more certificates than a mail order diploma company, even tried hot fixes. After working with MS dev tools since VB1, I am now considering flipping burgers as a career option. WCF, as far as I can see, is a complete lemon.
Anyway, to get to my actual question: If I run through this walkthrough:
http://msdn.microsoft.com/en-us/library/ff648840.aspx
I get to step 11 (adding the service reference) and get "There was an error downloading metadata from the address. Please verify that you have entered a valid address".
Details of the error gives: There was an error downloading 'https://localhost/SSL6/Service.svc'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:443
I'm using VS2008 on Windows 7 with IIS7. I followed the walkthrough exactly (apart from step 5 which was different on IIS7- I went into "SSL Settings" for the VD), so it shows my config (yes I've used httpsGetEnabled and mexHttpsBinding).
Anyone care to save my sanity and job?
EDIT: If I go into IIS, select the VD in content view, right-click on the svc file and browse, I get "Internet Explorer cannot display the webpage". Chrome gives "Google Chrome could not connect to localhost".
IE troubleshooting gives "the remote device or resource won't accept the connection".
If I browse using the IP address rather than using localhost via http, it says that it's secured with https ok. If I browse using the IP and https, I get HTTP error 503. The service is unavailable.
So it looks to me like a DNS issue combined with... something.
When I try to just run the service site project, I get "Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incoming HTTP requests are not blocked by a firewall". I've checked the firewall and it's ok.
Finally cracked it. There were at least three issues at play.
1) A DNS issue of some kind with localhost. It's still unresolved on my machine, but I can work around it by using the IP addy.
2) Another issue may have been that apparently, WCF doesn't work with IIS 7 OOTB. So you need to run command prompt as administrator, and run the following command -
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y
3) After I got through the certificate stuff I was still getting HTTP error 503, "Service unavailable". That ended up being leftovers from my previous attempts, still listening to ports:
http://blogs.msdn.com/webtopics/archive/2010/02/17/a-not-so-common-root-cause-for-503-service-unavailable.aspx
So to get a hello world level service happening with WCF and SSL took me a whole week, and in my travels I discovered many pilgrims who had taken about the same amount of time. Microsoft: You have failed.
Are you using IIS or self hosting? If you're using IIS, it sounds like it's incorrectly configured, because it seems it's not accepting connections on port 443; I guess you're probably missing a protocol binding (https to port 443). There's a detailed discussion of setting up SSL on IIS7 here that might be useful.
Of course, you could easily verify this using the browser, you should be able to connect to the site using SSL from it.
When I have had this error occur, I have found it very useful to run the service from Visual Studio to get additional information. Right-click on the service, and then select Debug -> Start New Instance from the pop-up menu. VS will launch the service using the WcfTestClient.exe.
WcfTestClient will display all the services and endpoints in your service project. A healthy launch will list your services in the a panel on the left, and provide a Start Page tab in a panel on the right. What will happen in your case, however, is that you'll get a list of services in a panel on the top and an "Additional Information" box along the bottom. Your problem service(s) will have a Status of Error.
Click on a problem service in the upper panel, and the Additional Information box will fill with an error message and stack trace. The message will tell you exactly what that problem mex (metadata exchange) address is. That may be enough of a hint for you to solve the problem. If not, post the Additional Information here and I'll be happy to take a look at it.