托管网站时出现的错误 [英] Getting and error With hosting the site

查看:77
本文介绍了托管网站时出现的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早晨

从早上起,我会用单个问题
撞到墙上
我使用itextsharp.dll在asp.net应用程序中生成Pdf文件.当我在Visual Studio中运行时,它运行良好,当我将自己的帐户托管在godaddy服务器中时,当我打开该页面时,我会遇到此错误.


错误:
说明:编译服务该请求所需的资源期间发生错误.请查看以下特定的错误详细信息,并适当地修改您的源代码.

编译器错误消息:CS0103:名称颜色"在当前上下文中不存在

源错误:


1169行:PdfPCell headp = new PdfPCell();
1170行:
第1171行:字体棕色=新字体(Font.TIMES_ROMAN,10f,Font.BOLD,Color.BLACK);
第1172行:Font brown1 =新字体(Font.TIMES_ROMAN,15f,Font.BOLD,Color.BLACK);
1173行:普通字体=新字体(Font.TIMES_ROMAN,10f,Font.NORMAL,Color.BLACK);

错误代码是错误.


请帮帮我,谢谢Q

Hi Morning

From morning onwards i am slapping my head to the wall with the single Problem
Iam using the itextsharp.dll for producing the Pdf file in asp.net application.when iam running in visual studio it was working fine , when i had hosted in godaddy server in my account, Iam getting this Error when i open this That page.


Error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name ''Color'' does not exist in the current context

Source Error:


Line 1169: PdfPCell headp = new PdfPCell();
Line 1170:
Line 1171: Font brown = new Font(Font.TIMES_ROMAN, 10f, Font.BOLD, Color.BLACK);
Line 1172: Font brown1 = new Font(Font.TIMES_ROMAN, 15f, Font.BOLD, Color.BLACK);
Line 1173: Font normal = new Font(Font.TIMES_ROMAN, 10f, Font.NORMAL, Color.BLACK);

Blod Code is Error.


Please help me out, THANK Q

推荐答案

hi
你可以试试看希望它能工作.
hi
you can try this. Hope it will work.
Font brown = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 14, Font.BOLD, iTextSharp.text.BaseColor.BLACK);


这篇关于托管网站时出现的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆