Skip to main content

Microsoft Silverlight

Unanswered Question TestPage.html.js constantly access deniedRSS Feed

(1)

bnkdev
bnkdev

Member

Member

8 points

5 Posts

TestPage.html.js constantly access denied

So I try to create a new SilverLight project on Orcas and I constantly get an Access Denied error on the following file:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\Silverlight\1033\SilverLightProject.zip\TestPage.html.js

I rebooted - no luck 

I tried a repair - no luck

I used a tool to see which process had a lock on this file, and no lock was found.

All other project types load up no problem...its just the one I want that will not load up!

Any ideas?
 

JALissiak
JALissiak

Member

Member

8 points

5 Posts

Re: TestPage.html.js constantly access denied

I had the same problem when I was trying to create new projects from the template.

 It turned out that my antivirus program was blocking access to the file becasue it was reported as having "a hidden extension", which when you think about it, it does.

Any one using "Hide file extensions for known file types" would see .html on the end of the file, when it is actually a .js jscript file.

Anyway, I just disabled my antivirus software, and it all worked as expected. Not the best fix, but it worked.

Hope it helps you too.

bnkdev
bnkdev

Member

Member

8 points

5 Posts

Re: TestPage.html.js constantly access denied

Thanks, that fixed it.

StephenLahti
StephenL...

Member

Member

4 points

2 Posts

Re: TestPage.html.js constantly access denied

I get the same error even tried to uninstall my AntiVirus any more tips

bnkdev
bnkdev

Member

Member

8 points

5 Posts

Re: TestPage.html.js constantly access denied

Yeah, try "hide extensions for known file types" under folder options. Only after I did that did the Access Denied error goes away

 Edited for typo Geeked

EricHaddan
EricHaddan

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

Make sure you uninstall and reboot your system.  I was using the AVG Free Edition and it complained about the html.js file.  Even if you exit the control center, the AVG service is still running.  If you have the paid version, you can set it to ignore the file extensions.

bnkdev
bnkdev

Member

Member

8 points

5 Posts

Re: TestPage.html.js constantly access denied

 Yep it was AVG. Even shutting down AVG it still complained, the only way around it was to hide known files extensions. Guess its time to switch from AVG to something else Super Angry

StephenLahti
StephenL...

Member

Member

4 points

2 Posts

Re: TestPage.html.js constantly access denied

Guys thanks For ALL your help with the AVG issue I do have pro found the Settings for file EXT

 

THAT WORKED

Stephen

vj9999
vj9999

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

 If you don't want to uninstall or disable your anti virus app, rename Default.html.js (or whatever your filename is) and remove .html part (Default.js for example).  Edit Default.html and change script tag to use Default.js instead of Default.html.js and you should be good to go.

ewroolie
ewroolie

Member

Member

9 points

4 Posts

Re: TestPage.html.js constantly access denied

I agree with vj9999.  I had considerable difficulties with this issue and decided to rename instead of uninstalling AVG.

Since Silverlight is going to be internet (unless you're doing it for an internal network where you can control which AV the client is using), you need to expect that some of your users will have AVG installed and will get this warning when they visit your Silverlight page.  I can think of few things that will discredit a website faster than a virus warning.  Expression Blend is producing the double extensions, too. 

I think uninstalling AVG is a bad idea.  In fact, it sounds like running AVG in a Virtual PC session might be a good idea for testing before deployment (that is, when Silverlight finally goes live).

Eric Wroolie
Overpass Ltd.
http://www.wroolie.co.uk

mg@code5.dk
mg@code5.dk

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

StephenLahti:

Guys thanks For ALL your help with the AVG issue I do have pro found the Settings for file EXT

 

THAT WORKED

Stephen

Where did you find these settings in AVG?

 

Morten

Chris5287
Chris5287

Member

Member

2 points

2 Posts

Re: TestPage.html.js constantly access denied

I had the same problem, if you dont want to unistall or shutdown AVG, even with the free version, you can stop the "Access Denied" problems by going into your Control Center on AVG, click on the properties of the Resident Sheild and in the Properties tab, deselect "Turn on AVG Residential Shield protection". If you want to stop AVG moaning at you for doing this, click on the General Tab and select "Ignore faulty condition of the component". Then click ok. Then when you've finished developing for the day, just knock resident shield and your good to go again.
 

AsinuS
AsinuS

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

 I had to turn off the residential shield before it worked. thx for the tip Chris5287

Tkadosh
Tkadosh

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

I had to unstall the AVG ... Tongue Tied 

theman17
theman17

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

  I'm not sure if I'm missing something here or not but I also have AVG and I initially tried everything stated above (besides uninstalling AVG) but during the process I noticed that I do not even have a SilverLightProject.zip folder in the C:\Program Files\Microsoft Visual Studio\9.0\Common7\IDE\ProjectTemplatesCache\Silverlight\1033\ folder.  Even after a repair and re-install the folder just does not exist there.

  This error seems to be a fairly common occurrence so has anyone found a conclusive reason for why this happens and how it can be corrected?  Thanks in advance for any help on this:)

Snowbleach
Snowbleach

Member

Member

8 points

4 Posts

Re: TestPage.html.js constantly access denied

This does not work when you try to create a new project. You can rename the files and modify the .html file, but that won't change the settings in the template projectfile. I tried tweaking the SilverlightProject.csproj, but I am unable to rename the TestPage.html.js to TestPage.js (I tried changing the filename, but it's greyed out in the Properties window). Then I tried removing the TestPage.html.js and adding the TestPage.js manually (Add Existing Item to Project), sadly the project fails to build. I've ran out of options, since A) I don't want to remove AVG or change the settings and B) I prefer to always see file extenstions so hiding file extensions for wellknown types is not an option either for me.

 So, until someone comes up with another solution, I can't play with Silverlight yet. Any ideas?

adefwebserver
adefwebs...

Member

Member

436 points

121 Posts

Silverlight MVP

Re: TestPage.html.js constantly access denied

bnkdev:

So I try to create a new SilverLight project on Orcas and I constantly get an Access Denied error on the following file:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\Silverlight\1033\SilverLightProject.zip\TestPage.html.js

If you have AVG like me then you only excluded AVG scanning from certain directories, When you create an ORCAS project they put the files in new directories, you have to go into AVG and exclude those paths too.


SilverlightDesktop.net

A framework that allows you to dynamically load Silverlight modules into resizable draggable windows.

Snowbleach
Snowbleach

Member

Member

8 points

4 Posts

Re: TestPage.html.js constantly access denied

Bump. Has any come up with an alternative to the above methods?

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: TestPage.html.js constantly access denied

Yes. I just posted (based on your question) an updated version of the template.

I did this quick and dirty, so I didn't create a new template; I just overwrote the old one. I also fixed several issues with it related to the 1.1 Alpha Refresh.

You can get the install instructions and download it from here.

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

Snowbleach
Snowbleach

Member

Member

8 points

4 Posts

Re: TestPage.html.js constantly access denied

 

Psychlist1972:

Yes. I just posted (based on your question) an updated version of the template.

I did this quick and dirty, so I didn't create a new template; I just overwrote the old one. I also fixed several issues with it related to the 1.1 Alpha Refresh.

You can get the install instructions and download it from here.

 Thanks a lot! You lifesaver you :)
 

Snowbleach
Snowbleach

Member

Member

8 points

4 Posts

Re: TestPage.html.js constantly access denied

Psychlist1972:

Yes. I just posted (based on your question) an updated version of the template.

I did this quick and dirty, so I didn't create a new template; I just overwrote the old one. I also fixed several issues with it related to the 1.1 Alpha Refresh.

You can get the install instructions and download it from here.

 Unfortunately, I cheered a little too soon. Your zip file contain the exact same double extensions. Is there something I'm missing here? I followed your instructions, overwrote the files. Still getting the same error, unable to create a new project.

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: Re: TestPage.html.js constantly access denied

The template contains files with _html.js and _xaml.cs instead of the actual double dot extensions.

When you created a new project, did the default project name come up with "PMB" at the beginning? If not, then you may not have waited long enough for the template cache (or whatever it is doing when you install templates) to rebuild.

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

ebuzoku@hotmail.com
ebuzoku@...

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

Hi,
Here is my solution, don't disable AVG!!!

  1. I did unzip the template
    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\CSharp\Silverlight\1033\SilverlightProject.zip
    to a new folder.
  2. Renamed the TestPage.html.js to TestPage.js
  3. Opened the TestPage.html, changed the reference to TestPage.html.js to reflect the new file name
  4. Opened SilverlightProject.vstemplate, changed the reference to TestPage.html.js to reflect the new file name
  5. SilverlightProject.csproj, changed the reference to TestPage.html.js to reflect the new file name
  6. Zipped up the folder with all the files in it
  7. Renamed the zip to SilverlightProject.zip
  8. Copied the zip into C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\CSharp\Silverlight\1033\
  9. Done!

Hope it helps

Grant me the serenity to accept the things I can not change and the courage to change things that I can not accept!

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: TestPage.html.js constantly access denied

ebuzoku@hotmail.com:
Hi,
Here is my solution, don't disable AVG!!!
  1. I did unzip the template
    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\CSharp\Silverlight\1033\SilverlightProject.zip
    to a new folder.

My earlier post above also has a link that has this all done for you Cool

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

mmsdstudio
mmsdstudio

Member

Member

2 points

1 Posts

Re: TestPage.html.js constantly access denied

Hey to all

 I guess that I'm missing something. I'm using (at least I tried to use itCrying)Silverlight 1.0 and VS 2005 SP1 but i get that access denied error all the time. The solution by Pete is for Silverlight 1.1 Alpha and VS 2008 beta 2.

 
Will this work for me???

Thank you in advanced!
 

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: TestPage.html.js constantly access denied

Steps to fix for you in VS2005 with Silverlight 1.0:

  1. Disable AVG Antivirus
  2. Create a new silverlight project
  3. Rename the default.html.js file to default_html.js
  4. Re-enable AVG Antivirus
  5. Update your script file references inside default.html

Each time you want to add a new .html.js file, repeat the steps above. It's a pain, but frankly, AVG's method of detecting a potential virus is pretty outdated at this point and should be updated.

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

Sopheap Ly
Sopheap Ly

Participant

Participant

902 points

205 Posts

Re: TestPage.html.js constantly access denied

I hope Silverlight and VS team won't go ahead with this controversial .html.js double extension in Silverlight gold. Silverlight lives in the web, and you will never be able to tell when this double extension will break again in other anti-virus programs. The safest option is to change this stupid double extension to just one, and that's ".js". It is not Microsoft's trademark for VS team to protect and hold.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities