Posts

Showing posts from January, 2012

C sharp code automation

hi all,     have created c sharp project  , same project using different product. change need replace variable name. there way automate same. regards, sagar kango sagar kango some examples of code smippet: http://msdn.microsoft.com/en-us/library/ms165392.aspx video tutorial available too: http://msdn.microsoft.com/en-us/vstudio/ee625748.aspx i'm not sure if it's want. caillen msdn community support | feedback us develop , promote apps in windows store please remember mark replies answers if , unmark them if provide no help. Visual Studio Languages  ,  .NET Framework  >  Visual C#

Need access to hotfix 2640103

can please access hotfix 2640103? didn't find other way of contacting support. thanks! in forum ms support moderator posts " microsft not charge access hotfixes. " http://social.technet.microsoft.com/forums/en-us/w7itproinstall/thread/efcdfdff-af6e-4e17-a58b-13291e1967bd#8f00b0c9-2e1f-4766-9922-5db39e6587a2 microsoft support site offers submitting paid ticket or posting forum. how can hotfix obtained free? decide after incident if charge or not.  if hotfix fixes problem, won't charged. .NET Framework  >  Common Language Runtime Internals and Architecture

c# run RegSvr32 programmatically through Windows Form and get its DialogBox's message

Image
i'm creating c# windows form application register and/or unregister dlls programmatically. that, use instance of system.diagnostic.process class. redirect both stdoutput , stderror inside textbox element. using following code, when reg or unreg managed .dll file (that use regasm.exe) can obtain redirecting goal. in case of regsvr32.exe problem occurs: regsvr32's resulting dialogbox raises (in both success or error cases)... message totally blank. so have tried use regsvr32's /s flag option... dialogbox not raise up, nothing becomes written inside textbox. is there can me solve problem? i'm getting crazy! thanks! a curious note: i'm stubborn, i've tried register unmanaged dll, using simple code (without /s flag), implementing c# console application... regsvr32 dialog box pretty visible in both success , error cases. so i've substituted process block code in old code regsvr32 dialog box still not appear!!! here windows form code:

Invariants on interface properties?

hey guys, it's me again. today tried define contracts on interfaces. thus, it's working methods, got problems on properties, i've defined on interface. let's consider interface/contract-class pair: 1 [contractclass( typeof (contractforiaccount))]  2 public   interface  iaccount  3 {  4      float  balance {  get ; }  5   6      bool  withdraw( float  amount);  7      void  deposit( float  amount);  8 }  9   10 [contractclassfor( typeof (iaccount))]  11 class  contractforiaccount : iaccount  12 {  13     [contractinvariantmethod]  14      protected   void  objectinvariant()  15     {  16         contract.invariant(((iaccount) this ).balance >= 0);  17     }  18   19      float  iaccount.balance  20     {  21          get   22         {  23              return   default ( float );  24         }  25     }  26   27      bool  iaccount.withdraw( float  amount)  28     {  29         contract.requires(amount > 0);  30   31          return   default ( bool );  32     }  3

Unable to perform consult and transfer a call on lync client

we experiencing failure in performing consult , transfer call on lync client or through lync client api scenario below: 1->lync client got incoming (audio) call , answered it, put on hold; 2->lync client made new direct (audio) call lync client b, , got answered b; 3->on lync client a, options under "current conversations" greyed out, i.e. call not 'complete transfer'; if ran our application using lync api, 'false' api call 'avmodality.caninvoke(modalityaction.consultandtransfer)', i.e. it was not allowed perform 'complete transfer'. we have other lync clients able perform transfer, , 2 machines never work on transfer. lync clients of same latest version, , machines running have same system (windows 7 sp1). have tried swap users log in. tests have showed not lync users. two 'transfer failure' lync clients never work no matter lync user log in, , the other 'good transfer' lync clients work no mather user lo

NULLReferenceException when using LINQ query with In clause

hi, i not sure code breaking. kindly it's production issue. it's not happening in sit, on production. nullreferenceexception occurring when below method called:         internal bool isfilingpartywithactivelab(string docid)         {             ibackendmediator bckendmd = null;             list<doccasepartyentity> lstdcpwithlab = null;             try             {                 if (!string.isnullorempty(docid))                 {                     bckendmd = new backendmediatorimpl();                     list<doccasepartyentity> lstdcp = bckendmd.getlistdoccasepartybydocid(docid);                     lstdcpwithlab = new list<doccasepartyentity>();                     if (lstdcp != null && lstdcp.count > 0)                     {                         lstdcpwithlab = (from dcp in lstdcp                                          dcp.filingind == filingpartyind.y &&                                      

Programmatically add rtf hyperlink to rtf file

i need create method receive string filepath , have update rtf file inserting string hyperlink. problem how translate filename clickable rtf link in c# add file. tried use richtextbox initializing text property rtf file text don't know how add link. , tried doing directly in rtf link don't target filepath because need txfielddata kind of hexadecimal code don't know how generate it. i'm totally stuck... any idea? hi anleopa, i trying involve people have more experience on topic. please patient, give more information when further process on it. , here related blog may help: http://www.codeproject.com/articles/9196/links-with-arbitrary-text-in-a-richtextbox in addition, since not wpf specific question, wil move c# forum better support. understanding! regards, lisa zhu [msft] msdn community support | feedback us develop , promote apps in windows store please remember mark replies answers if , unmark them if provide no help.

I can't get my Task<> to execute!

new kind. have tried write task<> can awaited: task<bool> renderasync(string reportname) { return new task<bool>(() => { return render(reportname); } ); } i execute method declared async following: await renderasync(thereport); the app compiles without errors , renderasync called , returns have expected. however, code within lambda never runs , render method , never called. missing? michael michael you're not starting task: task<bool> renderasync(string reportname) { var task = new task<bool>(() => { return render(reportname); }); task.start(); return task; } or simpler: task<bool> renderasync(string reportname) { return new task.run(() => { return render(reportname); }); } Visual

anatomy of commerce server 2007

hi members, it'll great if 1 of share me more information on anatomy of commerce server 2007 , wheather windows 2007 server supports features of commerce server 2007. regards, saradhi hi saradhi, i recommend take through documentation available online .  recent , give overview of system , various components.  it's pretty typical web/database application in terms of architecture business-specific systems. as windows "longhorn" support, i'm not sure features looking @ specifically.  haven't tested on longhorn , given "in development" status believe official word there support in future service pack release. cheers, colin Commerce Server  >  Commerce Server 2007

Best practice regarding interface implementation?

i have had cause declare number of interfaces , have found mnyself having think creatively 2 specific issues. example consider itranslatable interface. interface itranslatable { // methods string getculturalname(string locale = ""); // properties string internalname { get; } string locale { get; set; } guid translationkey { get; set; } } now, applied many classes don't want provide base class implementation since many of implementors derived more important. instead use code snippets insert skeleton implementation (within own #region) , flesh out. , brings me 2 issues , me wondering if there better solution out there don't know about? 1. field declartions. is bad idea / reasonable / idea put field declarations fields exist support interface implementation  within #region interface implemented? or should field declarations molved top of class found people conventionally expect them be? can't put them in interface might fee

Saves documents (any file type) in specific folder in hard disk using c#

hi experts i scanning different type of documents (any file type,most of them images). scanned documents should save in specific folder ,(for eg: c:\scanneddocumets". want save scanned documents using c#. save document in destination folder.can please guide how can that. thanks , regards murali2014 hi visit following link http://stackoverflow.com/questions/1572436/write-binary-file mark answer if find useful shridhar j joshi lot Visual Studio Languages  ,  .NET Framework  >  Visual C#

Response From WCF-OracleDb Adapter

Image
hello, i trying connect oracle using wcf-oracledb. generated schema using add adapter metadata wizard. schema generated doesn't contain typed columns. has collection of columnname, columntype , columnvalue. how can apply biztalk maps converted canonical format? regards, software engineer yes why not ,your case mapping untyped message typed message .what need here use iteration funtiod index , map canonical typed schema . your map should 1 thanks abhishek BizTalk Server  >  BizTalk Server General

Failed to fetch swagger. Ensure you have CORS enabled on the endpoint and are calling an HTTPS endpoint.

hi, i doing on poc getting records on-premise sql using logic apps + api apps. i have created sql connector in api apps , created logic apps. when try add sql connector api app in logic app designer. saying  i " failed fetch swagger. ensure have cors enabled on endpoint , calling https endpoint." i browsed , found out setting permission level. 1. appsettings - > set api definition & cors enabled. 2. authentication/authorization - > on -> allow request (noaction) 3. restarted api service. but still getting same error. i have browsed url "http://ftpconnector<someuniqueid>.azurewebsites.net/" . saying permission  "permissions service \"ftpconnector\" set internal" how can change permission level. think if change able add connector in logic app designer. please assist thanks, vinoth there 2 parts api apps v1 version of sql connector - api app host (the web app has code), , api app resource (just container

Help refactoring with attention to SRP and OCP

i have collection class representing users in database, called users.  want add load function class data database.  load function later changed implement kind of asynchronous loading and/or ui update on it's progress know want separate class , utilize interface.  here's i'm thinking far: public interface iload function load() as integer end interface public enum databasetype mysql mssql end enum public class loadfactory private _load as iload public sub new (databasetype as enum .databasetype, connectionstring as string ) select case databasetype case databasetype.mysql _load = new mysqlload(connectionstring) case databasetype.mssql _load = new mssqlload(connectionstring) end select end sub public function getinstance() as iload return _load end function end class public class u

What are "Container Widget" and "Projection Widget"?

hello, have troubles finding out "container widget" , "projection widget" are. when customizing "developer portal", can add widgets clicking [add] button. see "choose widget" page , see following widgets available: - blog archives - container widget - html widget - menu widget - projection widget - recent blog posts understand 4 of available widgets using them, 2 widgets, "container widget" , "projection widget," still unknown me. tried google them still don't clues. , how can use them? information helpful. thank in advance! the cms based on orchard. here descriptive information orchard docs: http://docs.orchardproject.net/en/latest/documentation/builtin-features/#containers http://docs.orchardproject.net/en/latest/documentation/projection/ disclaimer: this response contains reference third-party world wide web site. microsoft providing information convenience you. microsoft not c

componenet error 1714 during sql12 installation

my pc today unexpectedly shutdown today , sql wouldn't work anymore (i think registry got corrupted). tried uninstall it, wouldn't uninstall. manually uninstalled (delete folders , registry) when installed it, got few component error 1714 codes. don't think visual studio bids installed or management studio. log file: overall summary:   final result:                  failed: see details below   exit code (decimal):           -2068052302   start time:                    2013-04-27 22:44:41   end time:                      2013-04-27 22:52:17   requested action:              install setup completed required actions features. troubleshooting information features:   next step adv_ssms:        use following information resolve error, , try setup process again.   next step ssms:            use following information resolve error, , try setup process again.   next step bids:            use following information resolve error, , try setup process again.

SQL Replace Pattern

hey, i'm looking replace/update instances of state abbreviation. this: <span class="region">ca 98657 <span class="region">fl 33025 <span class="region">ny 78346 ... etc, etc. there no closing <span> tag, want update these abbreviations be: <span class="region">ca</span> 98657 <span class="region">fl</span> 33025 <span class="region">ny</span> 78346 ... etc, etc. in other words want find instances of: <span class="region"> ... skip/count 2 characters , add: </span>   ... how can this? you can turn select command update way (if using sql 2005 , up) declare @pattern varchar (30) set @pattern = '%<span class="region">%' ; with cte as ( select region, stuff (region, patindex (@pattern,region) + len (@pattern),0, '</span>' ) as

ORDesigner.DslPackage not loading in Visual Studio

i need here.  working fine while working on silverlight/wcf/linq project , started getting 'package load failure' when loading vs2008 project. also pops again when trying load linq .dbml file designer. so, somehow package got corrupted. now, have tried these... reset visual studio vs command line. reset skipped packages. reinstall .net 3.5 sp1 uninstalled vs2005 on system well. repair vs2008 uninstalled vs2008 , reinstalled vs2008 sp1 , vs2008 tools update so far, nothing has fixed problem. thought perhaps solution, creating new solution , adding linq sql file pop same message. any would be appreciated. thanks.          hi jungle, does project can opened on other computers have vs 2008 installed?  suspect problem not related vs dbml file.  please create bland new project , use new linq sql file?   cooperation. best regards, jonathan Silverlight

Pretty weird behavior in finalizer stack (bug?)

i encountering weird problem .net 1.1. have class public class myobject {     int myid;     ~myobject()     {         // lock , misc. snipped         mystaticclass.signaldeathof(myid);     } }   when class collected, death signal send mystaticclass . based on that, mystaticclass performs several operations, , call stack of depth 6 generated (starting @ myobject.finalize() ). (ps: know dispose pattern etc, not problem here, trully need intercept finalizer). comes weird bug public class mystaticclass {     public static void signaldeathof( int id)     {        // not 'object' class in code        // plus 'obj' referenced rooted object.        object obj = new object();        methoda(id, obj);     }     public static void methoda(int id, object obj)     {        // work        // obj != null (seen through debugger + assert)        methodb(id, obj);     }     public static void methodb(int id, object obj)     {        // bug: o

Access to .resx and web.config

sorry if this not appropriate forum section, didnt find better one. here goes problem. i need let users have access (being able change values) resource files (where put language translations), app.config files (i have 1 each of components) , web.config file. obviously tell them change things directly in xml files, not seem elegant solution, thought there might better way this...   thanks not! hi raul,    read post , guess have application , several customers application deployed, want give customers ability of localizing labels, etc    wrong?      first thing suggest separating labels in separated file (an xml 1 good) , create basic gui user localize each. may have in config file meta info of labels (in other words, belong -app.config, resources, web.config-)      gui may have final button regenerate app after of finished      particularly web.config may changed thru asp.net administrator tools ( http://msdn2.microsoft.com/en-us/architecture/ms379597.aspx )