Posts

Showing posts from March, 2011

Azure WebJob fails with exit code 532462766

hi i have scheduled webjob. of times runs successfully. once in 10 ten times, fails. below logs get. using app insights logging exceptions. [> 8a1006: sys info] status changed initializing [> 8a1006: sys info] run script 'something.webjob.exe' script host - 'windowsscripthost' [> 8a1006: sys info] status changed running [> 8a1006: info] starting someindexloader...finished someindexloader. [> 8a1006: info] starting someotherindexloader...finished someindexloader. [> 8a1006: err ] [> 8a1006: err ] unhandled exception: system.typeinitializationexception: type initializer 'myapp.common.logger' threw exception. ---> system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.invalidoperationexception: type 'microsoft.applicationinsights.extensibility.runtimetelemetry.remotedependencymodule, microsoft.applicationinsights.extensibility.runtimetelemetry' not loaded. [> 8a100

COM call from WndProc causes runtime error 8001010D

hello all, following scenario: i'm developing .net 1.1 application in c# burn cds/dvds via imapiv2. for unimportant reason i'm stuck .net 1.1 makes implementation pretty tricky anyways. right i'm having pretty basic com-architecture related problem. i've react on events when cds/dvds inserted or removed machine , (on inserting) media details (writable? rewritable? capacity? free sectors etc). purpose use wndproc shown in following snippets:   btw: there way these message without window? code snippet using system; using system.windows.forms;   namespace burningtests {  public delegate void wndprocdelegate(ref message m);    public class wndprocprovider : nativewindow  {   public wndprocdelegate onwndproc;     public wndprocprovider(form parent)   {    parent.handlecreated += new eventhandler(this.onhandlecreated);    parent.handledestroyed += new eventhandler(this.onhandledestroyed);   }     internal void onhandlecreated(object sender, eventargs e)   {    assignh

Storing a Reference to the Document Object when the Office App initializes

hello, i'm trying create task pane app excel , utilizing msdn article http://msdn.microsoft.com/en-us/magazine/jj891051.aspx. the article suggest store reference mentioned in title. problem new javascript think missing simple in encapsulation. the errors methods app.initialization() or app.get_document(office.document.context) don't exist. i appreciate help. /// <reference path="../app.js" /> /// <reference path="../office.js" /> /// <reference path="~/scripts/office/1.1/excel-web-16.00.debug.js" /> /// <reference path="~/scripts/office/1.1/office-vsdoc.js" /> (function () { "use strict"; // initialize function must run each time new page loaded office.initialize = function (reason) { //display initialization reason. if (reason == "inserted") write("the app inserted"); if (reason == "documentopened")

Remote WMI Slowness - Get processes running on Remote Machine

hi all, good afternoon ! have been trying  processes running on remote server in same domain. wmi calls slow. the painful thing in wmi there no option query process using "username" or "owner". couldn't believe microsoft has columns in wmi win32_process class not "username" field. i want find processes being run specific user. since there no direct option that, m getting running processes in machine , each 1 of them using getowner method, loading them data table , binding data table grid view. this method takes forever , takes more 10 15 mins produce result. wmi dead slow. there choice of using system.diagnostics namespace , use "processes" class , getprocesses("machinename"). again, here there no option processes specific user. i have running processes , again , again deal wmi takes infinite amount of time. can experts here please me find if doing wrong or have live wmi slowness.? private datatable loadinggrid()

Custom Resolver not appearing in the ESB 2.2 itinerary designer

hi, i using biztalk esb 2.2 version. have created custom itinerary messaging service tracking bam data. customize bam activity selection have created custom resolver class with required resolver extender , resolver extender provider classes. have gaced dll of project (which contains resolver classes) . have added resolver in esb.config similar did itinerary messaging service. able view custom itinerary messaging service in service name section of itinerary service however not able view custom resolver in resolver implementaion selection when add new resolver. could please me in trubleshooting issue. this lib folder esb 2.2: c:\program files (x86)\microsoft visual studio 11.0\common7\ide\extensions\microsoft.practices.services.itinerary.dslpackage\lib BizTalk Server  >  BizTalk ESB Toolk

Moving classes into folders and namespaces

hi, guys.   i have declared class  csomething in root project folder. project named myproject csomething class inside namespace named myproject . when create folder named controllers and create class ( ccontroller ) in folder, inside namespace named myproject.controller , fine. but now, when move csomething class folder, namespace remains myproject .   i have created many classes in root , feel need organize them. question is:   - is there way rename the namespaces in classes' declarations when moving them new folders other manually renaming them?   thanks in advance! hi zzajoman,   as far know, there no support in vs.net ide to rename namespace of class when moving new folder. the work around try open moved class in new folder , press " ctrl+h " shortcut replace old namespace new one.     hope helps,   regards, citizens on earth   Archived Forums V

Azure data factory V2 Error

i trying create data factory using .net sdk getting following error... operation returned invalid status code 'forbidden' sanjay, do 2 things mentioned below: 1. please register .net app contributor  role in subscription. should take care of forbidden problem. option available under  subscriptions > access control (iam) 2. double check whether microsoft.datafactory provider registered in subscription. option check/register namespace available under subscriptions > resource providers . should azure providers required sdk .net code. default ony few providers registered in protal. hope helps. regards, kallol bosu roy choudhuri Microsoft Azure  >  Azure Data Factory

Login not working after deployment of package.

hi, we moving dev envoirment other dev enviorment. have 2 site 1 on intranet(windows authentication) and other on internet(form authencaiton) sharepoint have done import/export. deployment of commerce server have used package creation. goes well. using registration webpart of commerce server, user getting created. when same user tries login says server not log in username , password incorrect. below findings. @ login page inside signin_authenticate event. membershipuser user = sitecontext .commercemembershipprovider.getuser(username, false ); above statment returns user trying logged in. (success) string userid = (( guid )user.provideruserkey).tostring( "b" );   userprofile userprofile = profilecontroller .current.getuser(userid); (success)   above userprofile returns user , data. spclaimsutility .authenticateformsuser(context.request.urlreferrer,username, signincontrol.password); above statment returns false , though providin

How to use system font settings

Image
for windows application (c#), is it possible adjust entire application use system font settings size rather using fixed sizes? users visual impairment have set bigger font size on machines. application should adjust font according user has.   hi bajajg, thank posting. after checked post, here’s option. please check it. i think question related dpi. here’s detailed reply understand conception. think helps. back scenario, think should dynamically different user screen resolution when user executes application every time. (includes: customer closed application careless, etc.) here’s code sample how user screen resolution. not know why want this, if i’m correct mentioned, think has corrupt performance of application. hope helps. if have question, please feel free let me know. best regards, larcolais gong[msft] msdn community support | feedback us get or request code sample microsoft please remember mark replies answers if , unmark them if provide no help.

Silverlight CodeContracts and rakefile

i'm getting weird code contracts error when using rakefile compile silverlight solution. seems if use the  older version of code contracts works, installing latest version doesnt work. if build silverlight using "rake sl4" seems compile. if build (.net 35,net40...) using "rake rebuild" following error @ sl project. (compiling under vs2010 works fine sl projects.) it open source project , source code can found @ http://facebooksdk.codeplex.com/sourcecontrol/network/forks/ntotten/version5  ccdoc failed uncaught exception: index out of range. must non-neg   ative , less size of collection.   parameter name: index   stack trace:    @ system.throwhelper.throwargumentoutofrangeexception()      @ system.collections.generic.list`1.get_item(int32 index)      @ microsoft.cci.mutablecontracts.contractextractor.extractclump(list`1 bl   ocklist, int32 startblockindex, int32 startstmtindex, int32 endblockindex, in   t32 endstmtindex)      @ microsoft.c

TcpClient

hi all, i building tcp listener is supposed capture data device in our network. device broadcasting data comma delimited. example: datfield1, datafield2, datafield3, etc. @ times device transmit different data structure (different length). so, need able capture different sizes of data. doing far. class program { static void main(string[] args) { tcpclient client = null; networkstream netstream = null; try { client = new tcpclient("192.168.1.xx", 00000); console.writeline("connected server..."); while (client.connected) { netstream = client.getstream(); //byte[] buffer = new byte[49]; //netstream.read(buffer, 0, 49); byte[] buffer = new byte[client.receivebuffersize]; netstream.read(buffer, 0, cl

Joining within a collection/Selecting a large set of values

hello everyone, i'm testing documentdb new project, , @ moment i'm not sure if , how can realize use case. lets have following in collection: about 500000 employee records: {  "id": "1", "type": "employee", "name": "testname", "lastname": "testlastname" } // , more and have team records {  "id": "45612354", "type": "team", "teamname": "greatteam", "members": [ 1, 55049, 29969, 23492 ] } there can 50000 teams 10000 members each. as input, i've specific team id , want return employee records of team. in rdbms create 2 tables, query team id , member ids in employee table. how here? let each member have personal team list , id, every query need in list of every employee -> potentially check millions of ids. is join operator applicable in case? can efficiently udf one: http://stackoverflow.com/questions/25

using genetic algorithms to improve voice commands recognition

i'm using "system.speech" library recognize voice commands, want use genetic algorithms improve recognition, , i'm new gas , i've questions: how implement (what population in situation? genomes..) can done using c# speech recognition library or should use fft.... other advice ll apprecited. thank you hi medlag, i might not have correct detailed answer need, might lead right direction solve problem. i have done search you. here is an article you. using genetic algorithm improve performance of speech recognition thanks. we trying better understand customer views on social support experience, participation in interview project appreciated if have time. helping make community forums great place. click here participate survey. Visual Studio Languages  , 

Archive peer to peer file transfer in code?

hi, following advice of technet community support, re-post skype business forum suggested post here. i have problem. i'm have customer have set of requirements of met except one: peer peer file transfer archiving (a mandatory requirement). (note: not monitoring - meet requirement.)  now know official line sfb can't ( https://technet.microsoft.com/en-gb/library/dn951419.aspx?f=255&mspperror=-2147217396). but, there skype business api exposes functionality preferably @ server? (please don't query requirement itself: i've been through 1 , it's non-negotiable!) tia Lync Server  ,  Unified Communications  >  Microsoft Lync Client Development

Problem clearing directions

i seem having problems clearing directions, no doubt it's somthing silly doing 0x800a01b6 - javascript runtime error: object doesn't support property or method 'resetdirections' this sort of doing microsoft.maps.loadmodule('microsoft.maps.directions', function () { var directionsmanager = new microsoft.maps.directions.directionsmanager(bingmap); // set route mode driving directionsmanager.setrequestoptions({ routemode: microsoft.maps.directions.routemode.driving }); var waypoint1 = new microsoft.maps.directions.waypoint({ address: 'home', location: new microsoft.maps.location(52.8437614440918, -1.33560001850128) }); var waypoint2 = new microsoft.maps.directions.waypoint({ address: 'system.web.ui.htmlcontrols.htmlgenericcontrol', location: new microsoft.maps.location(55.558349609375,-2.0686399936676) }); directionsmanager.addwaypoint(way

Converting a MatchCollection into an ArrayList?

i've got question - simplest way convert matchcollection regex search arraylist? on similar note, it's of underlying point of confusion me - there difference between two?  both appear one-dimensional array, seems strange sort of redundancy. c# newbie, learning on go. ask lot of followup questions answers given, fair warning , all. hi thequinch; question, "what simplest way convert matchcollection regex search arraylist?", simplest way when creating arraylist supply matchcollection parameter following: // mc object in following statement matchcollection arraylist arraylist = new arraylist(mc); question, "is there difference between two?  they both appear one-dimensional array, seems strange sort of redundancy.", yes there is. when work objects in arraylist working objects of system.object when retrieve element of arraylist need cast underlaying data type gain access properties. when working matchcollection working typed collectio

Bing Maps and aspx

i have integreated bing maps in asp based website, rewriting on asp .net c# i cant seem find bing maps control anywhere ? 1 exist ? i'm struggling understand how can working aspx, can show example there no official asp .net c# control bing maps microsoft. there 3rd party controls available. take @ open source control: http://bingmapsasp.codeplex.com/ http://aspnetbingmaps.codeplex.com/ this may of interest: https://simplovation.com/page/webmapsve.aspx if interested in using mvc i'd suggest looking @ project: http://ajaxmapdataconnector.codeplex.com/ note of above built on bing maps v6.3. outdated version of bing maps , should new developments using bing maps v7. also, bing maps v7 control built using html5. excellent control , has lot more features our older controls. can use javascript develop against it. note if want best user experience should load data project using ajax rather reloading page each search. improves performance , and user experience.

Call a receive pipeline in orchetsration for debatching

why we call receive pipeline in orchetsration debatching ?is there specific reason ? can apply other technique debatching in orchestartion ? prakash debatching in orchestration can done in 2 main ways: by calling receive pipeline in orchestration by using code. when mean code, can using xpath nodelist in atomic scope or pass debatching logic external .net helper. rachit's article can give insight performance of these options. microsoft has seen requirement , seen people use various methods debatch. came pipeline manager pipeline can called in orchestration debatch, better in terms of performance. lose “recoverable interchange” option when call receive pipeline in orchestration. so chose option based on quality of interchange/batch receive. if interchange/batch going perfect , if not facing issues in debatch or format of interchange, prefer go calling receive pipeline in orchestration. if message quality vary , there possibilities of many messag

VS 2012 Project targeting .NET framework 4 doesn't work properly without installing .NET Framework 4.5 on client machine.

i have ms visual studio professional 2012 ver. 11.0.51106.01 update 1 , solution, projects targeting .net framework 4.0 in client machines have installed .net framework 4.0, (there not installed .net 4.5), , program doesn't work properly. on client machine windows 7, after installing  .net 4.5 program begin work properly. on client machine win xp can't install .net 4.5. specifically, problem field "name" doesn't appear on standard object property editor dialog. [browsable(true), category("main"), localizeddisplayname("modelvarname"), editor(typeof(translisttypeeditor), typeof(uitypeeditor))]         public override string name         {             { return base.name; }             set { base.name = value; }         } installing ndp40-kb2600211-x86-x64.exe on client machine doesn't help. thanks in advance if can't fix it, feature it! hi ru_val, please check project doesn't use in-place changed fea

Web Service consumer Content hash

i have been tasked creating web service client consume web service transaction gatewy. part of requirements  must create hmac hash of number of values , inject these values http header. believe have of figured out 1 portion of data has me puzzled 1 of values needed hmac hash sha-1 hash of actual contents of transaction. since building using soap using service reference data xml. question how hash xml makes transaction? can provide guidance on how accomplish this? thanks, mark is there reason want use legacy technology asmx purpose? should using wcf. in fact, custom extension wcf routing service in .net 4.0 seem meet needs quite well. john saunders wcf is web services. not 2 separate things. use wcf new web service development, instead of legacy asmx or obsolete wse use file->new project create web service projects Archived Forums A-B  >

How to create objects dynamically by passing type in c#?

currently, have following code: if (type = "products") this.viewmodel = new productsviewmodel(); else if (type = "categories") this.viewmodel = new categoriesviewmodel(); else if (type = "customers") this.viewmodel = new customersviewmodel(); now, want simplify 1 , create objects based on type parameter passed, if there 40 or 50 different types, don't have type in many if/else statements. there easy way out similar delegates or function pointers?  for example, have function pointers/delegates defined based on type , can execute respective function passing key dictionary type. dictionary<string, func<string, list<string>>> functions = new dictionary<string, func<string, list<string>>>(); functions.add("products", productslist); functions.add("customers", customerslist); functions.add("categories", categorieslist); functions["products"](); // execu

Tabs are displayed as arrows in my text editor

i don't realy know did, sources are displayed in vs text editor arrows instead of tabs , dots instead of spaces. for example, instead of line such as              int = 10; i see line -->       int =10; how reverse ? hard work this... i'm thinking of reinstalling visual studio..... no need reinstall :)  there command called "edit.viewwhitespace."  it's available off of edit | advanced menu , it's called view white space.  command meant make easier have consistent spacing (if 1 developer using tabs , using spaces formatting can incorrect if tab size set differently on different machines). anson Archived Forums V  >  Visual C# IDE

GetIndetities() c# equivalent?

hi im writing ios app, have c# mobile services end.  its essential app able actual token interacting facebook graph api, google etc... i need able post users social media channels if choose to. i need c# end because im making use of owin lib. know getidenties() method in js need. need custom sort of linkedin flow inbuilt type info? work? thank in advance  john harris hi john, there equivalent in .net backend. can use following of controllers: serviceuser user = (serviceuser) this.user; facebookcredentials creds = (await user.getidentitiesasync()).oftype< facebookcredentials >().firstordefault(); string accesstoken = creds.accesstoken; Microsoft Azure  >  Azure Mobile Apps

[ScriptMethod(UseHttpGet = true)] attribute for Web Methods

i have many method sin web service , methods decorated with [scriptmethod(usehttpget = true)] attribte. read msdn article attribute , says can use method if set true. so, if set attribute true, can call web service follows? http://<mywebservice>.asmx/<methodname>?param1=value1&param2=value2  in way beneficial? how make difference web service call make program consume that. kindly let me know example. thanks, k.v.n.pavan so, if set attribute true, can call web service follows? yes, do. http://<mywebservice>.asmx/<methodname>?param1=value1&param2=value2  can consume via jquery using post if prefer too: var params = '{}'; $.ajax({ type: "post", url: "usercontrolsservice.asmx/getusercontrol", data: params, contenttype: "application/json; charset=utf-8", datatype: "json", success: function(msg, status) { $("#resposta").html(msg.d); }, er

Why isn't String.Join working the way I though it would?

i have following code: public void encypt(string input) { int[] numarray = input.tochararray().select(x => int.parse(x.tostring())).toarray(); int[] encryptarray = new int[4]; numarray[0] += 7; numarray[1] += 7; numarray[2] += 7; numarray[3] += 7; numarray[0] %= 10; numarray[1] %= 10; numarray[2] %= 10; numarray[3] %= 10; encryptarray[0] = numarray[2]; encryptarray[1] = numarray[3]; encryptarray[2] = numarray[0]; encryptarray[3] = numarray[1]; string output = string.join("", encryptarray.tostring()); console.writeline(output); } what thought happen output string of in encryptarray array.  instead, system.int32[]; i tried this: foreach (int digit in encryptarray) { output = string.join("", encryptarray.tostring()); } console.writeline(output); which gave me same answer , tried this: foreach (int digit in encryptarray) { output = string.j

RIA Services vs Workflow

ria services provides powerful solutions developing business applications.  highlight ability handle both server , client side validations. we have been given workflow tools that also offer powerful solutions developing business applications.  doesn't seem best of both worlds...  can have application follows workflow but provides ria validation. it seem if want use cud methods of ria in workflowservice lose validation. the trade-offs... unless i'm missing something...  seems if use workflowservices (.xamlx) then cannot use goodness of ria services (.metadata|.shared.cs). are these technologies compatible??  either, or? has been able use domain services in context of workflowservices without losing goodness ria services?? thanks. i have not seen ria services/workflow integration going on. have a workflow service being called domainservice not aware of examples out there. Silverlight

Small Basic Challenge of the Week 6, 7 and 8

welcome 'smallbasic challenge of week'.  suggestion programming project users can contribute solutions/ideas , each other.  there no prizes , rule use standard smallbasic methods (no extensions). post solutions/help on thread remain 'sticky' 1 week before move onto next. please give suggestions future 'challenge of week' or general feedback on type of challenges see. week 8 (august 19th - august 25th, 2011)   text challenge write program allows user enter sentence computer spell check. hint: use dictionary class definition of each word. if no definition exists can assumed word spelt incorrectly. example: input: kwick brown fox jumps on lazey dog. output: "kwick" , "lazey" not correct. graphical challenge write program draw regular polygon given number of sides. example if user enters 5 program draw regular pentagon. hint: might need brush on trigonometry skills! week 7 (august 12th - august 18th, 2011) text chall

Printing existing controls

hi, have treeview complex data on screen , send printer (using sl4), i'm encountering 2 problems: 1) cannot add treeview border etc before printing in visualtree. recalculating data , writing control created in code-behind not option due time of calculations required. there way this? 2) set maxwidth of treeview in 'printdocument.printpage' event, seems fruitless, treeview still prints on edges of paper. there way calculate pagewidth? doing everytime page prints seems bit of odd idea... need treeview resizeand fit page? thanks  there option in margin can set default margin , use it, may work out. thanks,  choda Silverlight  >  Programming Silverlight with .NET – General

Can i use licencing C# 3rd party ribraly (it Licencing model) in azure functions?

 develop azure functions c# , using visual studio. have error using c# 3rd party library. c# 3rd party library licencing model library. not free. used "licenses.licx" not it. error message {    "id" : "46e07385-7f21-4192-af51-4cffe12813c6" ,    "requestid" : "9df2f948-2a6d-477e-b111-1a93a9cce140" ,    "statuscode" : 500 ,    "errorcode" : 0 ,    "valid license using" library name "on system not found [code: g nodeid: bw 3 da z 5]." message ":" exception while executing function : d 365 cdatafunction ->. } there tried it? can use licencing c# 3rd party ribraly (it licencing model) in azure functions? azure app service web able run. seems supporting "licenses.licx". thank you. Microsoft Azure

Migrating from MongoDB. Trying to understand how DocumentDB works.

i have mongodb database 21gb (and growing) , contains dozens of collections (clients, orders, etc.). toying idea of migrating documentdb. first tried use documentdb's mongo api , failed miserably because documentdb doesn't support lot of mongodb features (aggregation, etc.). created 1 documentdb collection each mongodb collection, break bank me.  on mongodb collection equivalent of table, common practice use 1 collection per entity hierarchy (one collection users, 1 collection products, etc). on documentdb, looks not same. can store several unrelated entities in single collection. correct? also, getting different types of information depending on read documentdb. in 1 place read collection limit 250gb , don't have worry underlying complexity. on other places, read each partition 10gb , have assign partition keys collections. quite confusing used mongodb. if collection limit 250gb, need 1 collection store data. don't need have 1 throughput orders , different 1

Not able to display data loaded from .csv file DataGrid in WPF

i having trouble displaying data in datagrid. i've searched online , found 1 of possible solutions or seems still no luck. wondering if tell me what's wrong code? fiy: loading .csv datatable , exporting datagrid. here code: using system; using system.collections.generic; using system.linq; using system.text;using system.windows; using system.windows.controls; using system.windows.data; using system.windows.documents; using system.windows.input; using system.windows.media; using system.windows.media.imaging; using system.windows.navigation; using system.windows.shapes; using system.data; using system.io; namespace splash { /// <summary>    /// interaction logic mainwindow.xaml    /// </summary>    public partial class mainwindow : window    {         dataloader datatable = new dataloader();        } public mainwindow()        {        initializecomponent();        } private void data_table(