CS0246:找不到类型或命名空间名称'clsAnnounceController'(您是否缺少using指令或程序集引用?) [英] CS0246: The type or namespace name 'clsAnnounceController' could not be found (are you missing a using directive or an assembly reference?)

查看:73
本文介绍了CS0246:找不到类型或命名空间名称'clsAnnounceController'(您是否缺少using指令或程序集引用?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在托管我的网站时遇到编译错误。

是否因为缺少DLL引用?我不知道哪个DLL ..请帮助我。在此先感谢!

Hi i get compile error while hosting my website.
Is it because of a missing DLL reference? I have no idea as to which DLL.. kindly help me out. Thanks in advance !

推荐答案

我终于找到了解决方案....



好​​先让我解释我的问题到底是什么:

我在.net framework 4.5中开发了一个网站应用程序并托管在Godaddy服务器上。



我的网站应用程序在本地机器上工作正常,但在托管它给我'找不到类型或命名空间'错误。



分析:它有与装配参考无关。问题是托管网站的错误方法!



这个网站是临时的,我必须将它作为样本网站托管到主域名。

我做的是,我在托管服务器的根目录中创建了一个文件夹,并将我的示例网站内容上传到该文件夹​​。我试图使用URL访问该示例网站 - http // mycompanyname.net / samplewebsite - 这给了我上面提到的错误(作为一个新手,我不知道正确的方法来完成它。对于有经验的开发人员,这将我想要笑一笑:D)



解决方案:如果您打算在主域内托管示例网站..

1.创建子域。

2.将您的内容托管到与子域名相同的文件夹中。



Ex:假设我的根域是mycompanyname.net

i创建了一个名为samplewebsite的子域

将我的内容上传到名为'samplewebsite'的目录中在我在Godaddy的托管帐户的根目录下

最后我的示例网站可用并在URL中运行 - http://mycompanyname.net/samplewebsite



为了在Godaddy中创建子域,请参阅此链接https://support.godaddy.com/help/ article / 2290 / how-do-do-do-a-sub-domain-in-simple-control-panel [ ^ ]



希望这可以节省一个新手时间,最终在这里遇到同样的问题。祝你有美好的一天!
I found the solution finally....

Well First let me explain what really my problem was:
I developed a website application in .net framework 4.5 and hosted on Godaddy server.

My website application was working fine in local machine but on hosting it gave me 'Type or namespace could not be found' error.

Analysis: It had nothing to do with assembly reference. Problem was the wrong approach of hosting the website!

This website was a temporary one and i had to host it into the primary domain as a sample website.
What i did was, i created a folder inside my root directory of my hosting server and uploaded my sample website contents into that folder. And i tried to access that sample website using URL - http//mycompanyname.net/samplewebsite - which gave me the above mentioned error (as a newbie i wasn't aware of the right approach of getting it done. For experienced developers this will be something to laugh on i guess :D)

Solution: If you intend to host a sample website inside your primary domain..
1. create a subdomain.
2. Host your contents into the folder which was created with same name as of subdomain.

Ex: Suppose my root domain is mycompanyname.net
i created a subdomain with the name samplewebsite
uploaded my contents into the directory with the name 'samplewebsite' under the root directory in my hosting account in Godaddy
Finally my sample website was available and running in the URL - http://mycompanyname.net/samplewebsite

Inorder to create a subdomain in Godaddy refer this link https://support.godaddy.com/help/article/2290/how-do-i-create-a-subdomain-in-simple-control-panel[^]

Hope this saves a newbies time, who ends up here facing the same issue. Have a great day !


这篇关于CS0246:找不到类型或命名空间名称'clsAnnounceController'(您是否缺少using指令或程序集引用?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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