Register  Login
Forums
 
CS0122: 'System.Linq.Strings' is inaccessible due to its protection level
Last Post 07-14-2010 03:36 PM by rogercarvalho. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Resolved
rogercarvalho
New Member
New Member
Posts:8

--
07-08-2010 03:08 PM  
Hi,

i installed the Standard aspnet Version on
my web hosting Server, and i Get this error:

CS0122: 'System.Linq.Strings' is inaccessible due to its protection level.

Compiler Error Message: CS0122: 'System.Linq.Strings' is inaccessible due to its protection level

Source Error:

Line 1449: if (RequesterNameLabel.Text.Length > 10)
Line 1450: {
Line 1451: RequesterNameLabel.Text = String.Format("{0} ...", Strings.Left(RequesterNameLabel.Text, 10));
Line 1452: }
Line 1453:


Source File: e:\inetpub\vhosts\opticaoscar.pt\httpdocs\helpdesk\Controls\View.ascx.cs Line: 1451

I need some help to solve this problem.
thanks
Roger



admin
Basic Member
Basic Member
Posts:267

--
07-08-2010 03:34 PM Accepted Answer  
You are getting this error, because the system is trying to call the "String" method that is in "Microsoft.VisualBasic". For some reason it is not finding it and it is trying to call the method on "System.Linq".

Did you alter the source code or open this up in Visual Studio?

1) Ensure you are running your site in ASP.NET 3.5

2) If you have altered the source code:
A) Ensure that your project is targeted to ASP.NET 3.5
B) Ensure you have "using Microsoft.VisualBasic;" in the "View.ascx.cs" file
C) Ensure the project builds
admin
Basic Member
Basic Member
Posts:267

--
07-08-2010 03:48 PM  
I just checked the source code, and that is not the original code on line 1451, so it appears you have adjusted the code.

The changes I listed in #2 should solve your problem.
rogercarvalho
New Member
New Member
Posts:8

--
07-14-2010 03:36 PM  
Hello!
I want to thanks, your sugestion did result.

I open the project in Visual Studio and after that i upload the files into the Host Server and not work.

I Upload the entire site without open in Visula Studio and Now it works.

thanks.
Roger
You are not authorized to post a reply.


Powered by Active Forums
Terms Of Use | Privacy Statement | Copyright 2009 by Michael Washington Dynnamite DotNetNuke Skins & Modules