Posts

Showing posts from June, 2010

C# concepts (When to use what)

hi team, we have lots of material on net , books talking c# concepts , how use example. do have material (book & links) talks c# concept , in situations use concept. we have lots of material on net , books talking c# concepts , how use example. there no such thing c# concepts. however, there object oriented programming concepts oop languagellike java, c# , vb.net must adhear , follow. http://en.wikipedia.org/wiki/object-oriented_programming do have material (book & links) talks c# concept , in situations use concept. any monkey can write c# code. it's more know how design solutions using design patterns. http://www.dofactory.com/net/design-patterns http://www.dofactory.com/products/net-design-pattern-framework Visual Studio Languages  ,  .NET Framework

Restrict the number files Picked up by BizTalk FTP Adapter

hi all i have ftp adapter. pickup files remote system.. how can reduce periodicity of picking files up, 1 file..  in min or so.. thanks in advance akaschmid ake not possible, maximum files setting controls how biztalk creates message batch write them sql.  applies file adapters number of messages in batch. the way have found control flood of message receive locations implement controller pattern orchestration creates single instance of orchestration , loops around process 1 message @ time, via correlation set. sorry. bill chesnut | biztalk server mvp | mexia consulting | melbourne australia http://www.biztalkbill.com please indicate "mark answer" if post has answered question. BizTalk Server  >  BizTalk Server General

Blend runs extremely slow when editing deep in controls (Steve) - 12/27/2007 6:31 PM PST

by: steve when i'm editing controls list view far down in scope lstview/scrollviewer/part_horizontal/thumb/rectangle every move mouse change colors or sizes takes 2-3 seconds before see change processor running @ 120% , pinned. in task manager it's fine idling away @ 3% deeper go in controls slower gets. have core2duo 6600 shouldn't issue doing such simple tasks else seeing this? thx! steve www.baseheadinc.com by: jonathan [msft] steve, what else have running @ same time? -- jonathan [msft] ---------- this posting provided "as is" no warranties, , confers no rights. please not send e-mail directly alias. alias newsgroup purposes only. "steve" <steve@discussions.microsoft.com> wrote in message news:d9d4cd04-9ddb-4367-a648-79bff642bef7@microsoft.com... > when i'm editing controls list view > far down in scope as > lstview/scrollviewer/part_horizontal/thumb/rectangle > every move mouse change colors

Bing Map Cache

hi i have created user control containing bing map control in windows 8 app, use user control inside list view 5 items, have list of 5 bing maps in 1 page. working fine after while working , navigating page, app crashed , closed. there way cache map when page loaded first time? if want cache state of map yes done. need attach viewchange event of map , when fired capture view information of map , store in user storage. when app loads check user storage map view information. http://rbrundritt.wordpress.com Bing Maps  >  Bing Maps for Windows UWP apps

background worker

hi, can  please refer me article can see how several background worker processes can used in application? samples see, using 1 in application. thanks yes, expected,but, see them being used in action , why asked articles refer to. thanks gave code in action only. needed implement event handlers. anyways, give example. suppose want peform following 2 operations on 2 seperate background workers. 1. find numbers between 1 2000000 , add them list (first backgroundworker this) 2. find multiples of 3 between 1 2000000 , add them list (second backgroundworker this) so here goes code. using system; using system.collections.generic; using system.componentmodel; using system.windows.forms; using system.threading; namespace multiplebackgroundworkerexample { public partial class sampleform : form { list< int > evennumbers; list< int > multiplesof3; public sampleform () { evennumbers =

ExecuteNonQuery

i have simple update function.  problem times out.  i'm not sure why since in mgmt studio runs instantaneously.   have rather simple update function... bool breturn = false ; datetime currentdate = datetime.now; sqlconnection dblogfile; string strcommand = "" ; string connstring = properties.settings.default.cnnstring; dblogfile = new sqlconnection(connstring); dblogfile.open(); // strcommand = "update [rawfacnotes] set [lastexportdate] = '" + currentdate + "' dataid = " + iid; sqlcommand mycommand6 = new sqlcommand( "update [rawfacnotes] set [lastexportdate] = '" + currentdate + "' dataid = " + iid, dblogfile); try { mycommand6.executenonquery(); dblogfile.close(); breturn = true ;

Preserve &#xa; entity from conversion to &#xA;

is there way preserve entity lower case without using explicit replace in string before saving document? i have in input document in xml attribute value this: attribute = "0gia&#xa;ane" and preserve entity lowercase. when xmldocument loaded in innerxml have this: attribute = "0gia&#xa;ane" code: streamreader reader = new streamreader ( stream ); string xml = reader . readtoend (); system . text . encoding encode = system . text . encoding . utf8 ; memorystream ms = new memorystream ( encode . getbytes ( xml )); xmldocument documentxml = new xmldocument (); documentxml . preservewhitespace = true ; documentxml . xmlresolver = null ; xmlreadersettings settings = new xmlreadersettings (); settings . dtdprocessing = dtdprocessing . ignore ; xmlreader readerxml = xmlreader . create ( ms , settings ); documentxml . load ( readerxml ); any hints appreciated. this n't new line issu

Toolbox Avatar Cannot Save PNG

i working module 08 - avatar , have gone through video , guide. when build , run avatar application open in browser using localhost:port. can customize avatar when go save avatar nothing saves. neither "download png" button nor "save" button save file. looks work because dialog browse window allowing me choose location , name of file. click "save" , dialog window goes away. looks great ... sucks, man there's no file ... :( what doing wrong or more need working , allow me save file. working in expression blend 3. have not tried in expression blend 4. any ideas? in advance. alex dove i have solved problem avatar not saving, however, of credit goes to  http://blog.blueboxes.co.uk  and http://stackoverflow.com/questions/1139200/using-fjcore-to-encode-silverlight-writeablebitmap issue appears in how save called application. fix included following steps: 1. commenting out ".png save" steps inside constructor 2. adding "but

WCF Publishing wizard and soapAction

hi, i have published schemas using wcf publishing wizard. when use tool such soapui action dynamically set http://xxx/external/membership/2014/06/membershipservices/getmembershipclassesrequest which seems be made of target namespace of service/servicename/rootnodeofschemarequest when @ wsdl soapaction name of operation eg getmembershipclasses . when using tool - soapsonar action being sent value wsdl file getmembershipclasses. it important full uri http://xxx/external/membership/2014/06/membershipservices/getmembershipclassesrequest  be reflected in the wsdl resolving itineraries based on the wcf action property. how can change soapaction in wsdl use full uri? possible?. workaround using save wsdl file , update soapaction , import soapsonar. prefer able browse service eg http://xxx/external/membership/2014/06/membershipservices.svc?singlewsdl , have soapaction uri not operation name. thanks biztalk developer hi jody, just imported couple of wsdls schema

Allow calls to untrusted https endpoint

Image
i have dev environment on azure , want use api mgmnt make calls  but 503 service unavailable , upon debugging see error : "the underlying connection closed: not establish trust relationship ssl/tls secure channel.","the remote certificate invalid according validation procedure." there way suppress exception during testing? useful when *.cloudapp.net target endpoint during dev/testing. thanks, @stevenlivz hi, based on understanding, can upload certificate azure api management portal, see more @ screenshot below. if misunderstand, please feel free let me know. regards Microsoft Azure  >  Azure API Management

Difference between Call and Start shapes.

hi everybody, can answer question form me :) why call instantiate new orchestration does not rely on message publication on other side start shape uses message publication ?? it’s provide asynchronous (call) , asynchronous(start) behaviours. message publication need messagebox db , since start orchestration flows through messagebox gives asynchronous behaviour. the start orchestration shape causes new orchestration created via biztalk messagebox. gives asynchronously behaviour. can enable invoke orchestration held within different biztalk host. can useful in scenarios in there elements of business process not critical perform immediately, , may want off-load processing later in business day or on separate dedicated server keep core processing servers being affected , improve latency of processing. in call orchestration shape, it’s used invoke orchestration synchronously in same thread. hence not rely on message publication. if answers question please mark accor

Running 1 Instance stateless WCF Service in 5 Node Cluster

hi, i new service fabric. have around 10 micro services running on 5 node cluster. wcf service, running guest executable. maintaining state in service, service has both signalr , wcf endpoint. service need run 1 instance every tenant.  all of our services guest executable.  azure load balancer randomly forwarding signalr request node. our service running in 1 node. of time connection gets failed.  is there way run single instance of service in azure service fabric , call service.   the idea every tenant 1 instance of service unique port number. rest of service run in the nodes in cluster. thanks there's no way achieve since should expect services move. best answer want have gateway received calls lb , used service fabric's resolution apis determine location of actual stateless services. require stateless services not guest exes. there reason why moved wcf services guests rather integrating api? allow solve problem if did , there examples , docs of ho

Null checking and if-blocks

this complaining possible null reference temp on line 7. 1     function  test( byval  source  as  ienumerable(of  byte ),  byval  format  as   string )  as   string   2          dim  temp = trycast(source, icollection(of  byte ))   3          dim  result   4          if  temp  is   nothing   or  format  is   nothing   then   5             result =  new  text.stringbuilder()   6          else   7             result =  new  text.stringbuilder(temp.count * format.length)   8          end   if   9          return  result.tostring   10      end   function     hi jonathan, for disjunctive conditions, want use orelse, not bitwise or operation. way, static checker can determine different control paths. function  test( byval  source  as  ienumerable(of  byte ),  byval  format  as   string )  as   string            dim  temp = trycast(source, icollection(of  byte ))            dim  result         

Extraction of Values from an XML SOAP Response in C#

0 down vote favorite i trying write down code read soap response message , extract values without success. i trying extract scalar values starting @ node <structure>. here code: //extracting xml http message. xmldoc . loadxml ( xmlhttp . responsetext ); xmlnamespacemanager nsmgr = new xmlnamespacemanager ( xmldoc . nametable ); nsmgr . addnamespace ( "ns" , "http://messages.ara.algorithmics.com" ); nsmgr . addnamespace ( "ns2" , "http://ws.ara.algorithmics.com" ); xmlelement root = xmldoc . documentelement ; xmlnode root1 = root . selectsinglenode ( "//structure" , nsmgr ); the message looking this: <? xml version = '1.0' encoding = 'utf-8' ?> <s:envelope xmlns:s = "http://schemas.xmlsoap.org/soap/envelope/" > <s:body>

How to bind a new sqlcommand in Gridview in C# expression edition

Image
hi, i am  using c# expression 2010. app.config file follows. beginner in c#. app.config file follows <?xml version="1.0" encoding="utf-8" ?> <configuration> <configsections> </configsections> <connectionstrings> <add name="windowsformsapplication1.properties.settings.employeeconnectionstring" connectionstring="provider=microsoft.jet.oledb.4.0;data source=|datadirectory|\employee.mdb;jet oledb:database password=getorg" providername="system.data.oledb" /> </connectionstrings> </configuration>   how can databind grid view control  using sql "select birthdat , empname  employee" in form_load event. with thanks polachan     polachan add reference "system.configuration" using following code using system; using system.configuration; using system.data.sqlclient; using system.windows.forms; private void form1_

How to track repeting record data using BAM in biztalk

hi all,   new bam, how can how track repeting record data using bam in biztalk,please find below input record <ns0:employee xmlns:ns0="http://biztalk_.employee.schemas.emp_in">   <emp>     <id>122</id>     <sal>222222222</sal>     <name>.srinu</name>     <dept>java</dept>   </emp>    <emp>     <id>666</id>     <sal>44444444</sal>     <name>.srinu</name>     <dept>java</dept>   </emp>    <emp>     <id>333</id>     <sal>7777</sal>     <name>.biztalk</name>     <dept>c#</dept>   </emp> </ns0:invoice> am tried using tpe showing 3 rows null  in bam primary import database. so please let know how can achieve above issue. regards, srinivas hi srinivas, using tpe cannot process repeating records. doesn’t allow loop through invoi

Print multiple files as one consecutive printout

one known way print multiple files 1 consecutive printout, include them in single report , print report. what simple means .net in c# provide without utilizing report ? thank you. hi,what kind of files talking about? pdf's? this: http://www.codeproject.com/questions/497390/codeplusforplusprintingplusmultiplepluspdfplusfile rgds mm ps: please mark answer if helpful. thanks! blog: http://www.manuelmeyer.net twitter: https://twitter.com/manumeyer1 Visual Studio Languages  ,  .NET Framework  >  Visual C#

C# tooltips work only when app launched from Visual Studio Debugger

  basically, thats it. have tool tips set on various controls , tips work advertised long im running under the debugger (f5). running under ide without debugger (ctrl-f5) shows no tooltips. building release & debug: both show no tooltips. executed on machine no tooltips. spy shows wm_mousehover being received controls.   do ship app instruction run under debugger? : )   thanks better ideas:))! strange, take behaviour identical on other machines? ross Archived Forums V  >  Visual C# IDE

BizTalk R2 WCF-Net.Tcp Adapter Consumption Issues

  hey ! i using biztalk r2   net.tcp adapter of wcf. can call biztalk service when receive @ client side, shows response null. although there no exception throws @ client side , neither suspended @ biztalk side.   for response verification checked suspend message call service , closed client show me right message in the   biztalk console.     for reference, code given below.   thanks time , consideration.       //client side code   [ servicecontract ] public interface imyinterface {   [operationcontract(replyaction = "*")]    memorystream sendrequest( stream stream); }     string addressuri = "net.tcp://localhost:8889/myservice" ; nettcpbinding binding = new nettcpbinding ( securitymode .none); endpointaddress endpointaddress = new endpointaddress (addressuri);   using ( channelfactory < imyinterface > factory = new channelfactory < imyinterface >(binding, endpointaddress))               

Getting a System.MissingMethodException on the production machine for files that work fine on my dev desktop

hi, i have big problem i'm not sure how resolve.  have asp.net / c# application.  recently, i've made changes several (3) dlls of "solution".  rebuilt solution under both "release" , "debug".  on machine, i've never had trouble running software.  has been tested , works expected. now, when copy 3 dlls (and other support files) on production machine , try access specific page (the 1 affected changes , uses new methods in other dlls), page throws "system.missingmethodexception". here's sample message / stacktrace: system.missingmethodexception: ? @ ifinance.volumetryreport.page_load(object sender, eventargs e) @ system.web.ui.control.onload(eventargs e) @ system.web.ui.control.loadrecursive() @ system.web.ui.page.processrequestmain() --- end of inner exception stack trace --- @ system.web.ui.page.handleerror(exception e) @ system.web.ui.page.processrequestmain() @ system.web.ui.page.processrequest() @ system.web.ui.page.proc

How to get current list item in announcement list using sharepoint app client object model

hello team,        how current list item in announcement list using sharepoint app client object model .                                    //gets current item announcement list                               splistitem announcementlistitem = properties.listitem;                                //store template layout of current item                              string templatelayout = convert.tostring(announcementlistitem["templatelayout"]).split('#')[1];                                //store description of current item                            string templatedescription = convert.tostring(announcementlistitem["body"]);                             //store template title of current item                                string templatetitle = convert.tostring(announcementlistitem["template"]);                                 int itemcount; and how add in publish field , fallowing code server side how call in client side. /

Powershell script to run against many servers and send combine output as email

say wanted run select @@version against 3 sql instances ( sqla, sqlb , sqlc) .. want email shows combined output of these results follows sqla   sql 2005.. sqlb   sql 2008,, sqlc   sql 2008... what want not above output, template give me idea of how accomplish collecting results against multiple servers, appending content , send combined output in email. have seen few examples online on how send email, connect 1 server, collect results , send output. want running against many servers, collecting , sending 1 email combined results.   you can take @ sample http://sethusrinivasan.wordpress.com/2012/01/11/powershell-script-to-run-query-against-many-servers-and-send-combined-output-as-email/   thanks sethu srinivasan [msft] sql server http://blogs.msdn.com/sqlagent SQL Server  > 

Automatic deployment of web application with publishing profiles directly from TFS 2012

we're using visual studio 2012 , team foundation server 2012 delveloping web application. i'm setting automatic deployment our iis test server. i've configured iis web deploy handler accept web deploy. i've created  a publish profile "test_deploy" in vs 2012. if run publishing using profile vs 2012 works fine. far, good. however, i'd automatically deploy app during automatic build in tfs. i've set team build , created build definitions. compiles fine. deployment added /p:deployonbuild=true;publishprofile=test_deploy msbuild arguments. again build runs through, afterwards nothing deployed iis. doing wrong? i had add visualstudioversion=11.0 msbuild arguments. works fine now. stumbled on chance no stackoverflow. have saved me hours if have been documented in official tutorials. there official documentation documents options one? Archived Forums V

bulk insert behavior - impact on the package's performance

i'm seeing an increase in run times between client development world , production.  on client, using production volumes, package runs in hour.  on production runs 80-90 minutes.  both environments using remote file servers data sources.  production has luxury of not having cross server joins development requires 1 , still runs faster.  input data source contains 2.5 million records can produce many times number of errors on error table , call duplicates unchanged records on duplicates table. i've checked see if indexes didnt make prod, no such luck. so i'm starting @ opportunities efficiency , explanations differences. i've got stats 1 or both environments specific things , focused on bulk inserts @ moment.  bulk inserts being requested in package via "table or view - fast load option" no lock, no check constraint, no keep identity, no keep nulls, no rows/batch , no max insert commit size. when watch graphics of client pkg running,  appears records being inser

Binding datagrid to list of custom object using BindingList

 hi,   i have used 3 tire methodology,  in data access layer have created customer class , other support   classes handle & encapsulate data customer table, insert , update & delete records database . when move data data access layer bll have used list of customer objects.   in same manner in bll have class customerbll   which contain definition of customer object , static & instance methods call related   static & instance of data access layer , these method can list of records , convert list of customerbll   objects , contain method handle insert , update & delete.   in ui layer have used static method of customerbll   objects list of customer objects (mylist )   list<customerbll> mylist = customerbll.getcustomerbyname("h", 0, int.maxvalue);   and because ilist not support add new / update data grid have converted binding list:   bindinglist<customerbll>   mybindinglist = new bindinglist<customerbll&

Web service invocation generates StackOverflowException

hello everybody, when call remote web service, stackoverflowexception occurs. the proxy client web service auto-generated on usual way retrieving wsdl file. invocation of web service method done through soaphttpclientprotocol class , invoke method. when execute read method xmlreader of response object, can see answer of called web service method. above-named exception give me no chance ready filled response object. does know how call web service? way debug scenario? how become more detailed information abot overflow occurs? it's because stackoverflowexception returns no stacktrace. regards, paulrem any particular reason calling web service through soaphttpclientprotocol? if no, can call web service simple instantiating web service class , invoke method name want call. refer link http://msdn.microsoft.com/en-us/library/6h0yh8f9%28vs.90%29.aspx   jagatheesan Archived Forums A-B

How to return multiple records using while loop?

i able return multiple records method below. using while loop extract multiple records current output showing 1 record.  i tried using <list> string , return output list seem working while loop.  please advice.  thank you.  public string teststory() { string result = ""; using (sqlconnection con = new sqlconnection(configurationmanager.connectionstrings["##"].connectionstring)) { con.open(); using (sqlcommand command = new sqlcommand("####", con)) { sqldatareader reader = command.executereader(); while (reader.read()) { string title = (reader.getstring(0)); string content = (reader.getstring(1)); result = title + content; //return result;

System.Security.SecurityPermission in an AppDomain in a ClickOnce deployment.

hi, i have bootstrapper application need able launch various other "sub applications" on users machine. apps , dlls needed installed part of clickonce deployment. the bootstrapper needs run each sub application in separate appdomain. the whole set works fine in debug environment , running exe files on local machine. however, deploy using clickonce start security exceptions. the actual exception included @ end of post. my code create appdomain follows:    appdomain appdomain = appdomain.createdomain("name", null, setup);    appdomain.executeassemblybyname("assemblyname", null, args); where args couple of strings, , setup has had applicationbase , configurationfile properties set. the problem occurs in sub app try create application.threadexception handler. seems trying access unmanaged code , sub app doesn't have permissions. the real question is, how can new appdomain have correct permissions.... some other points note:     - if elevate .net zone secur