iis - How to convert my folder into application using C# .net 2.0? -


i having project(folder format) in iis, want convert folder application (like right click->convert application), want perform in c# code, using .net 2.0. followed link using servermanager create application within application, don't know

site site = servermanager.sites.first(s => s.id == 3); 

what that? when try add code getting error called: microsoft.web.administration.sitecollection not contain definition first

please replies...

what that?

it's linq , not available in .net 2.0. need use .net 3.5 or later , have system.core assembly referenced in project , system.linq namespace added using directive in order bring .first() extension method scope.

if cannot upgrade more recent version of .net achieve similar results following:

site site = null; foreach (var s in servermanager.sites) {     if (s.id == 3)     {         site = s;         break;     } } if (site == null) {     throw new invalidoperationexception("sequence contains no elements match criteria (site id = 3)"); }  // @ stage use site variable. 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -