Copying font file to the local client machine

Hi,

I have an application that generate a report using microsoft word, I am using a spacific type of font and when I run the application I need to copy the file into windows fonts folder in the client machine.

 My code:

before the class begin I declared the following:

<Assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, _

All := "HKEY_LOCAL_MACHINE")>

After clicking the Generate btn the font must be loaded:

'--- Function to Add the Font '----

If Not File.Exists("C:\Windows\Fonts\ae_AlBattar.TTF") Then

File.Copy(server.MapPath("IncludeFiles\ae_AlBattar.TTF"),"C:\Windows\Fonts\ae_AlBattar.TTF")

AddFontResource(server.MapPath("IncludeFiles\ae_AlBattar.TTF"))

End If

The error:

Access to the path "C:\Windows\Fonts\ae_AlBattar.TTF" is denied.

Anyone can help please?

0
Rana
5/4/2009 8:48:06 AM
asp.net.config-deploy 12495 articles. 0 followers. Follow

3 Replies
1038 Views

Similar Articles

[PageSpeed] 20
Get it on Google Play
Get it on Apple App Store

Hello,

You application has not write permission on the client machine.

Regards


Windows Hosting ASP.NET | Top ASP.NET Hosts | Dedicated Windows Hosting
0
HostingASPNet
5/4/2009 12:01:44 PM

Of course, but how to create this permission?

How to add the font to the client machine succefully in order to print the word document correctlly?

0
Rana
5/4/2009 1:13:14 PM

I think this part must give me a write permission:

<Assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, _

All := "HKEY_LOCAL_MACHINE")>

But it doesn't work fine :(

0
Rana
5/4/2009 1:38:30 PM
Reply:

Similar Artilces:

.Net Application for Copying files from remoteserver to local machine on regular time interval.
Hi, How can I create one .Net application which will   Copying files from remoteserver to local machine on regular time interval.I spend a lot of time for searching  this in google.but I am not able to find the exact solution  . If any one having any idea regarding the same please let me know ..   Thanks In Advance Hari      Why use ASP.NET?  A scheduled batch file is easy and clean.  Use the Windows scheduler service. Your other option is writing a Windows service, which isn't ASP.NET. JeffPlease: Don't forget to click "M...

How to deploy .net project via 'copy project' in Visual Studio from your local machine to your web development server
Hi ,My IT Director has resigned and I am stuck in the middle of doing his all tasks. For safety reason we removed all functionalities from the developers to deploy any project and only given to IT director. He refuse to help me as he is having problem with the management. I have got a video tutorial for deplying project but not very helpful.Would any body kindly describe the steps required to setup a .net project or any tutorial can be recommended. I have setup website in IIS and pressing 'Copy Project' button in visual studio .net. The dialog box comes and ask me destination project folder ...

Font Installation (copying file into Fonts directory from server to user's machine)
From a page, I need to check - whetehr user have a specific font file on his machine. If not, program should copy this file from server to user's machine Windows/Fonts directory. How can I do this? You can't. Well, you could with an ActiveX control, but this would be quite a security risk, and most people would simply refuse to run it (and if they are using any other browser than IE it won't work anyway). If you're developing an intranet application, an ActiveX control might be ok: in this case you have control over the internal security policy, and can ensure your control ...

How to Deploy database from local machine to separate local machine?
I have been developing a database in SQL Server 2008 on my local machine. It needs to be set up for production use on another local computer at a separate location. How do I do this?  Hi,headmax Refer This for that http://aspnet.4guysfromrolla.com/articles/050907-1.aspxRAGHAV MVP ASP/ASP.Net Read My Blog MARK THE POST AS ANSWER IF IT HELPS U. "Success doesn't come to you…you go to it."--Marva Collins "Success does not come to those who wait . . . and it does not wait for anyone to come to it." Anonymous Hi, this might be of interest to you: SQL Serv...

Where to deploy the machine.config file ?
Hi,I'd like to understand where does the machine.config file should reside on the hosting (production) server ?In my local machine it is in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\CONFIG folder. But when I deploy my site to my hosting provider where do i copy this file to ?Thanks in advance.Any link to tutorials on how to deploy starter kits / ASP.net would also be most appreciated since my hosting provider only provides SQL 2005 and not SQLExpress. Not really sure why you need to change the machine.config file when you can use the web.config file to override most of the machine.conf...

Problem Copying a file from remote client using File.Copy
Hello, I have to copy a file that is uploaded from a remote client to Web Server into my application folder. I am using the following logic to achieve this. File.Copy(srcPath, destPath) Where srcPath = Path selected by the user using HTML File Input Control. and destPath = Server.MapPath(Excel_Upload) + "\Sample.xls" This works fine when I try uploading the file from the server system but when I try doing the same from a remote client, I get an exception which says "File.Copy Could not find a part of the path 'C:\Documents and Settings\Anas\Desktop\Sample12.xls'&...

Copying a file from the client machine to the server
I want to copy a file from a specific path on the client machine to the server. The problem is that I want to do it without any user interaction (No...I am not trying to hack the system). Is there ay way of doing it. I want to do it when the user logs on to the system. Shailesh Sure, but it requires installing an application on the client machine. Will that work? DonDon Kiely, MCP, MCSDIn the Last Frontier, Interior AlaskaPlease post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem! Yeah, I think y...

Copy file from Server to local machine
Hi,  How can I copy a PDF document from the web server to my local machine (eg. to C:\ Temp  folder)       Thanksbadis This should be simple as downloading any file. Just right click on the link for pdf and click on Save Target As.Deepak I think you misunderstood me. I'm asking how can you do it programmatically.Eg. on a Button click to copy a document from the server's Path to my machines path. and how paths look like a url or physical?Sample code will be helpful Thanks     badis Here is some code which ...

Writing a file to the clients local machine
I am new to web development. I am converting an onle VB6 windows app to vb.net webapp. So I have th following code snippet   Dim vFilename As String = "c:\W340_ta.txt" iFile = FreeFile() ' Get an open filenumber FileOpen(iFile, vFilename, OpenMode.Output, OpenAccess.Write, OpenShare.Default)   You can see it is openning up a file for syncronous write access on the clients local machine. Of course, since we are on the web I am getting an error message "UnauthorizedAccessException", access to the path c:\W340_ta.txt is denied.  How do I accomplish ...

Use a Name/value in Machine.config file in the web.config file
Hello. I want/need to access a variable in the machine.config file and use it in the web.config file. My scenario is: Each machine has a machine name, so (I assume this is the best place to put it) I want to create a variable in <appsettings> in the machine.config file called "MachineName".  In my web.config file, I want to use the MachineName variable in the machine.config in the appsettings.   Example: (web.config file)  ... <appSettings> <add key="ServerFileNames" value=\\ISCO1FEGRD\Dotnet_files\OrclIntlList.xml /> Replace the ...

Copying jpg files to local machine from URLs
Is there a way within a PB application to copy JPGs and other documents that live on one of our corporate websites to the local machine that is running the application. I currently have set up a window that has a list of resources for a given retreival argument. The user can click on the individual items and there browser opens to display the image or document (using HyperlinkToURL Fx). Now, users would like to be able to select multiple items and save them to there local machine so that they may burn CDs for third parties. Have you taken a look at the getURL( ) function? You s...

Failed to copy a file across the network to the local machine
Hi there,  Can someone show me how to copy a file across the network to the local machine?   I have a file that is located on the server and mapped it to the N:/ drive on the server and want to copy that file to the D:/ drive on the local machine, but it failed to copy it. When I traced thru the code and it failed to check the file exist in that ip address and failed to step into the code to copy  to the local machine. There is no restriction on the file, it allows all users to copy it,  Can someone show me the right way to do it? thanks, below is part of my co...

Copy files/directories from a local machine to remote one
Hello! I’m new in ASP.NET but I used ASP before. I am looking for ways to copy files and/or directories from my local machine to another remote machine (say, into a shared folder assuming I know the machine IP address). When copying all files from a directory and sub-directories, I should be able to pick only some of them (for instance, all files finishing in ".doc" and not exceeding 1 MB) How can I do that in ASP.NET, normal ASP or VB Script? It may be VB.NET since it seems to me that ASP.NET works with VB.NET whereas ASP didn’t use such things... The only way I ...

copy files from the server to a temporary folder on the local machine
We would like to copy desktop applications from the server to a temporary folder on the local machine and run passing parameters. Is this possible? > {quote:title=DENNIS TELL CARLOS wrote:}{quote} > We would like to copy desktop applications from the server to a temporary folder on the local machine and run passing parameters. Is this possible? At face value, this would not be possible; browsers do not allow access to the local machine directly by the server... too much of a security risk. You might accomplish it if you create an ActiveX control, though. Scott is correct tha...

Web resources about - Copying font file to the local client machine - asp.net.config-deploy

Copying - Wikipedia, the free encyclopedia
Copying is the duplication of information or an artifact based only on an instance of that information or artifact, and not using the process ...

Google Reportedly Copying Facebook’s Comment Plugin
The competition between Google and Facebook is about to spill over into plugins for websites: Reportedly launching soon, a comment system ties ...

Showing Apple employee #8 some of my artifacts. He remembers manually copying the Star Wars cassettes ...
jurvetson posted a photo: He has a rig that fed eight recoding tape drives from one master, and he would manually copy eight tapes at a time ...

Samsung Calls BS On Apple's Charges Of Copying - CONAN on TBS - YouTube
CONAN highlight: Samsung vigorously defends itself against Apple's absurd allegations! More CONAN @ http://teamcoco.com/video

CSAIL fixes software bugs automatically, in any language, by copying from safer applications
A new system can repair bugs in software using smart processing that imports functionality from other programs, all without access to source ...

Risk of other countries copying boat turn-backs low: UN High Commissioner for Refugees
The risk that other countries will copy Australia's hardline asylum seeker policies is low, the United Nations High Commissioner for Refugees ...

Hardware vendors sue Dutch government over copyright levies - regulation, legal, Dutch Home Copying Foundation ...
... on hard disks, smartphones, tablets and MP3 players that are meant to compensate the music and movie industries for losses caused by home copying. ...

Grace Jones slams Lady Gaga for copying her, describes her as soulless - The Courier-Mail Search Search ...
GRACE Jones has slammed Lady Gaga in a new interview, saying she didn’t “feel a soul” when she met the controversial pop star.

Iran claims to be copying US drone
CTV.ca Iran claims to be copying US drone Herald Sun AN IRANIAN military commander said the country is building a copy of a US spy drone captured ...

Hotel designer denies copying Aboriginal paintings
Guests at the Eclipse Hotel in Domaslaw, Poland, may be surprised to learn that its cutting-edge interior design is based on work by an Aboriginal ...

Resources last updated: 12/27/2015 1:44:51 AM