|
Hi,
I am using Sgen tool to create my own Serializer class. I have a silverlight class library (4.0) and using Sgen tool I am creating my Serilizer class. When I add the dll as a reference to my silverlight class library, it gives an error "You can't add a reference to the dll as it was not build against Silverlight runtime."
The command i used to create the dll is :
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETF
/compiler:/keyfile:"C:\dll\abc.snk" /a:"C:\dll\sample.dll"
Thanks
|
|
|
|
|
You've asked it once. That's enough.
|
|
|
|
|
The assembly format of silverlight is little bit different than straight-up .Net, and when attempt is made to use add Reference from Silverlight project to a plain-old-.Net assembly it just not work because of backward compatibility.
|
|
|
|
|
I have a custom web control that formats links. Here is a typical example of it being used:
<mine:DispatchLink ID="DispatchLink1" runat="server"
NavigateUrl="#"
Text="Test "double" and apostrophe’s"
ExtendedText="Test "double" and apostrophe’s"/>
This creates a link with href set to NavigateUrl , the inner value of the anchor set to Text and both the title attribute and text following the link set to ExtendedText . (There are other properties and a number of standard layouts not shown in this example.)
My problem is that the left double quote and right double quote entities are going into the control as plain double quotes; instead of getting Test “double” and apostrophe’s, I'm getting Test "double" and apostrophe’s. Yes, this affects only the double quotes and not the right single quote.
The code for both Text and ExtendedText look like this:
<Bindable(True), Category("Details"), DefaultValue("")> _
Public Property Text() As String
Get
Dim o As Object = ViewState("Text")
If o Is Nothing Then
Return ""
Else
Return o.ToString
End If
End Get
Set(ByVal value As String)
HttpContext.Current.Response.Write("<!-- ExtendedText: " + value + " -->" + vbCrLf)
ViewState("Text") = value
End Set
End Property
The test output in the Set part shows that value already contains the quote literals; this is not a matter of them somehow being translated by ViewState.
I can get the right output by using the entity numbers -- “ and ” -- but I use the entity names everywhere else on the site, and it will be confusing when I have to come back latter and make updates.
My questions: 1) Is this a known issue and 2) is there any way to pass these entity names into a custom control and have them not get changed?
|
|
|
|
|
It seems that this is a Framework "by design" annoyance: several entities get translated automatically before they go into a web control property, and there is nothing at all you can do about it. The solution is to go through and use &ldquo; and &rdquo; in place of the simple entities when I want to assign them to a web control property. And because & gets translated to a simple amperstand, I have to use && to generate the amperstand entity, which is necessary if I want my pages to validate (a "naked" amperstand is not valid XHTML.)
|
|
|
|
|
Use the HtmlTextWriter[^]
"When did ignorance become a point of view" - Dilbert
|
|
|
|
|
I got screwed on this when I bought VS 2008 Standard, and cannot make the same mistake twice. Nor am I interested in spending $11,000+ for the "Ultimate" edition.
|
|
|
|
|
You can write services with any version of visual studio.
All that is missing from the Standard & Express versions is the service project template. Everything above standard has the template.
Without the template, all you need to do is:
1) Add a reference to System.ServiceProcess.dll
2) Create a class that inherits from from ServiceBase
3) Override ServiceBase.OnStart and put your startup code here. Usually you will spin up a thread to do the work.
4) Create your service object in your main method and call ServiceBase.Run(theServiceObject)
Once you have built your .exe, you use installutil.exe[^] to install your service.
You can even do this from Visual Studio express editions (including 2005/2008).
Introduction to Windows Service Applications[^] is a good source of information. Just remember that you can still do it all, even without the template, you just need to create the code manually.
Simon
|
|
|
|
|
Good answer Simon.
I was going to answer the same earlier but never having created a service application, I was not sure of the steps required. +5
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have tried writing services in VS 2008 standard. I can get them compiled and (allegedly) installed, but they've never shown up in the Services panel. As a result, all of our in-house service code is still written using 2005.
Anyway, since we are looking to get 2010 anyway, I figured I would get the least expensive version with the service template. Since this is information that Microsoft does not bother to share in the product descriptions, I wanted to ask my peers.
|
|
|
|
|
If you're specifically after the template, it's in Professional and above.
Simon
|
|
|
|
|
Gregory.Gadow wrote: (allegedly) installed, but they've never shown up in the Services panel
It sounds like they didn't get installed. Did they run?
As far as I'm concerned, the template is very limited and only useful as a starting point for your first Service. After that, you should have your own classes that you use as a basis for more Services. Bear in mind that Windows Services is a very broad topic with many correct techniques for implementation -- the template can't cover them all, so it covers none.
Once you have your own preferred implementation technique (using a Timer, a Thread/sleep, etc.) you should write base classes that encapsulate it and never go back to the template.
|
|
|
|
|
PIEBALDconsult wrote: Gregory.Gadow wrote:
(allegedly) installed, but they've never shown up in the Services panel
It sounds like they didn't get installed. Did they run?
Nope; I could not get them to show up in the Services list. By "installed," I mean that I right clicked on the installation project in the solution and selected "Install" from the menu. This not working might be a function of having Standard rather than Professional VS 2008, I don't know.
|
|
|
|
|
Gregory.Gadow wrote: right clicked on the installation project in the solution
WTF! Try using INSTALLUTIL like a real man.
|
|
|
|
|
Yeah, what he said.
In fact you don't need Visual Studio at all; you can use <your preferred text editor> and the command-line compiler. Because Windows Services have no GUI there's nothing visual to design so VS is overkill.
P.S. Last spring I used VS 2010 Express to develop a little app that involved a WCF Web Service hosted inside a Windows Service.
|
|
|
|
|
hi All,
i am stuck with a problem with custom forms.
i m new to exchange server and may sound naive at times.
the problem is that i have modified the UIextension.xml file to add a Navigation bar item named as "MY Application" and on its click i want my custom form to be opened.
for this i have made a folder for my testform in the forms folder.
the testform will do nothing initially except printing some hello world stuff.
i have added a registry.xml file in that folder as well.
the registry and UIExtension entries are as follows
UIExtension File
<?xml version="1.0" encoding="UTF-8" ?>
<OWAUICustomizations>
<SmallIconMappings>
<!--You can register your own icons for custom message classes here-->
<!--Default IconFlag="Default"-->
<!--Default PrefixMatch="false"-->
<!--Attributes should be in the order of: ItemClass, SmallIcon, IconFlag, PrefixMatch-->
<!-- Sample entry:
<Mapping ItemClass="IPM.CustomClass" SmallIcon="CustomClass.gif" IconFlag="CustomClassRead"/>
-->
</SmallIconMappings>
<MainNavigationBarExtensions>
<!--You can register your own entries to appear in Outlook Web Access navigation bar here-->
<!-- Sample entry -->
<MainNavigationBarEntry LargeIcon="LargeIcon.gif" SmallIcon="SmallIcon.gif" URL="https://myserver/owa/forms/Testform/Default.aspx">
<string language="en-us" text="My Application"/>
</MainNavigationBarEntry>
</MainNavigationBarExtensions>
<NewItemMenuEntries>
<!--You can register your own entries to appear in Outlook Web Access New item menu here-->
<!-- Sample entry
<NewItemMenuEntry ItemType="IPM.CustomClass" Icon="foo.gif">
<string language="en-us" text="New custom item"/>
</NewItemMenuEntry>
-->
</NewItemMenuEntries>
<RightClickMenuExtensions>
<!--You can register your own entries to appear in Outlook Web Access mail view right-click menu here-->
<!-- Sample entry
<RightClickMenuEntry Icon="Icon.gif" URL="http://server/application.aspx" filter="IPM.Foo;IPM.Bar">
<string language="en-us" text="My Application"/>
</RightClickMenuEntry>
-->
</RightClickMenuExtensions>
</OWAUICustomizations>
And Registry.xml File is as follows
<Registry xmlns="http://schemas.microsoft.com/exchange/2004/02/formsregistry.xsd" Name="PremiumExtensions" InheritsFrom="Premium" IsRichClient="true">
<Experience Name="Premium">
<Client Application="MSIE" MinimumVersion="7" Platform="Windows NT" />
<Client Application="MSIE" MinimumVersion="7" Platform="Windows 2000" />
<Client Application="MSIE" MinimumVersion="7" Platform="Windows 98; Win 9x 4.90" />
<Client Application="Safari" MinimumVersion="3" Platform="Macintosh" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows NT" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows 2000" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows 98; Win 9x 4.90" />
<Client Application="Firefox" MinimumVersion="3" Platform="Macintosh" />
<Client Application="Firefox" MinimumVersion="3" Platform="Linux" />
<Client Application="Chrome" MinimumVersion="1" Platform="Windows NT" />
<ApplicationElement Name="Item">
<ElementClass Value="IPM.Contact._Default">
<Mapping Form="https://myserver/owa/forms/Testform/Default.aspx"/>
</ElementClass>
</ApplicationElement>
<ApplicationElement Name="PreFormAction">
<!-- Add this one generic entry for your custom message class, and everything will work
<ElementClass Value="IPM.Contact._Default">
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Preview"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Reply"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="ReplyAll"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Forward"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="New"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>"/>
</ElementClass>
-->
</ApplicationElement>
</Experience>
</Registry>
Please let me know how can i open the default.aspx page in Testform folder on click of MyApplication navigation Menu.
rite now with these enteries i m getting the following error
Exception
Exception type: System.Web.HttpParseException
Exception message: Could not load type '_Default"'.
|
|
|
|
|
Are you sure this relates to the .NET framework? It looks more like ASP.NET[^] to me.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
i haven't seen the category for the Exchange Server hence posted on this category.
|
|
|
|
|
Dear sir,
I have created controls dynamically and the controls are inside the table and the table inside the div.Im getting error in mozilla browser..
The sample html generated code is shown below
<div id=divall runat="server">
sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
| sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
| sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
|
I access the value as below
var divall = document.getElementById('divall');
//for getting all the controls inside the div
var allcntr = divall.childNodes[0].childNodes[0].childNodes;
for(var i=0;i<allcntr.length;i++)>
{
//for getting all the dropdownlist's value inside the table
var cmball=divall.childNodes[0].childNodes[0].childNodes[i].getElementsByTagName('OPTION');
for(var j=0;j<cmball.length;j++)>
{
if(cmball[j].selected)
{
//some code
}
}
}
//
divall.childNodes[0].childNodes[0].childNodes;
The above code is working 5n in IE but not in mozilla.
Is there any common code(compatible to all browsers mainly IE & Mozilla) to access the childnodes?
Thanx for your help in advance..
T.Balaji
|
|
|
|
|
And this has what to do with the .NET Framework??
Ask this in the Web Developement forum.
|
|
|
|
|
Well i had read in the w3schools.com that there is a small issue in accessing the childnodes.
balaji.t wrote: divall.childNodes[0].childNodes[0].childNodes;
This works fine in IE but not in Firefox.
The reason which i am not completely sure is that IE accesses with '0' index and '1' in Firefox.
So just try by using 1 instead of 0 for accessing.
|
|
|
|
|
Hi,
I am struggling to find any information on what I would have thought would have been a very easy thing to do. Does anyone know how to get hold of the values below, which are listed in the AssemblyInfo.cs file?
[assembly: AssemblyVersion( "0.0.0.0" )]
[assembly: AssemblyFileVersion( "0.0.0.0" )]
[assembly: AssemblyInformationalVersion( "0.0.0" )]
Any help or pointers to useful info would be very much appreciated.
Best wishes, Patrick
|
|
|
|
|
This[^] might help.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
That got me there. Thank you.
- Patrick
|
|
|
|
|
Hi guys i try to write a simpale server client appliaction. server transmit the file content to client and recieve an acknowledgment which is a "ok" string. i have some problem in my code.
using (NetworkStrem ns = new NetworkStream(client))
{
using (BinaryReader br = new BinaryReader(File.OpenRead(filepath)))
{
while (sent < file.Length)
{
data = new byte[20];
br.Read(data, 0, data.Length);
tempData = data;
ns.Write(data, 0, data.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
while (ack != "ok")
{
ns.Write(tempData, 0, tempData.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
}
sent += 20;
ack = string.Empty;
}
}
what'wrong here i dont know if u know tell me
Thanks in advance
|
|
|
|