Imacros Player - Access denied

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
COSMOS
Posts: 20
Joined: Thu Jul 28, 2016 5:11 am

Imacros Player - Access denied

Post by COSMOS » Fri Apr 07, 2017 1:38 pm

Hey guys,

Info: Imacros Browser V11.5.498.2403, Windows Server 2008 R2, IIS 7.5

When trying to access a website, I'm getting: "Access Denied - You don't have permission to access "http://..." on this server. Reference #..."
I don't know why this is happening and how can I solve this. It's giving me a reference number but I don't know what to do with it.
Have you guys ever encountered this problem ? If I open IE,FF,CH the site works ok on the server. Only in the imacros player it doesn't work.

Any help is welcome,
Thanks !
chivracq
Posts: 8429
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Imacros Player - Access denied

Post by chivracq » Fri Apr 07, 2017 9:12 pm

COSMOS wrote:Hey guys,

Info:

Code: Select all

Imacros Browser V11.5.498.2403, Windows Server 2008 R2, IIS 7.5
When trying to access a website, I'm getting: "Access Denied - You don't have permission to access "http://..." on this server. Reference #..."
I don't know why this is happening and how can I solve this. It's giving me a reference number but I don't know what to do with it.
Have you guys ever encountered this problem ? If I open IE,FF,CH the site works ok on the server. Only in the imacros player it doesn't work.

Any help is welcome,
Thanks !
Check the Source Code of the Page, they probably have some Browser (Version) Checking based on your UA (User Agent) expecting some IE/FF/CR/SA/OP UA but iMB has its own UA...
Solution would be to use '!USERAGENT' in your Script to "pretend" to be a "standard" Browser, ah-ah...! :idea:

>>>

Hum, mini-Rmk: Your Qt has nothing to do with 'Data Extraction', try to select the "correct" Sub-Forum when you open a Thread, grrr...! (Would have been the 'General' Sub-Forum in this Case, as there is no specific 'iMB' Sub-Forum like 'FF' and 'CR' have...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
Posts: 8429
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Imacros Player - Access denied

Post by chivracq » Sat Apr 08, 2017 4:55 pm

Some other possible Solution I think off, as I'm not sure if you can install IE Add-ons on iMB (then you could install some UA-Changer Add-on), is that iMB probably stores its UA String in the Registry where it stores all its (Default) Settings where you could permanently change it to some IE UA for example... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
COSMOS
Posts: 20
Joined: Thu Jul 28, 2016 5:11 am

Re: Imacros Player - Access denied

Post by COSMOS » Mon Apr 10, 2017 7:11 am

Thanks for your reply !

This makes perfect sense. Initially I thought that the website has banned my ip or something.
But this only happens when I run my application with the imacros browser.

I'm trying to change the useragent to mimic another browser but I'm not having any luck.
How should I do this ?

I'm running the imacros commands from a C# class library where I have a method which looks like this:

public void StartRobot()
{
iimRobot.iimOpen("-runner -silent -v7", true, 300);
GoToWebsite(storeLink);
for (int i = 0; i < inputList.Count; i++)
{
SearchWebsite(inputList.ElementAt(i).Trim().Replace(" ", "<SP>"), i);
}
iimRobot.iimClose(300);
WriteIntoDB();
}

I'm guessing I should do iimRobot.iimInit("-userAgent ..???something?? "); //i don't know what to put here
Or perhaps when I write every imacros command like TAG POS=...to do before that a SET !USERAGENT "??something??"
But these commands are already between double quotes because it's a string.
Does it work like this ?
string search_macro = "SET !USERAGENT '??something??' \n TAG POS=1.."

I was hoping of setting it once in the beginning so the iimInit version sounds better but I don't know what to write for the -userAgent.

PS: sorry about posting it here..i thought it was related to data extraction since I can't extract anything :) my bad :oops:

UPDATE: It seems that it doesn't work on IE either. I tried doing iimOpen("-ie -runner", true, 300);
That's when I realised that if I open a regular IE browser and try to access this website, I'm getting the same "Access is denied on this server".

UPDATE 2: For anyone having this problem, I managed to solve it using a proxy. It's ugly and might increase your extraction time but it works if your really desperate like I am now.
Post Reply