Posts

Showing posts from May, 2010

Exception handler, construct and send shape

  i have catchexception block in orchestration. within build exception message using construct shape , send message port direct message box bound   this working fine. until had add web service calls within exception block perform clean up. in addition existing shapes have 2 web service calls.   issue whenever exception thrown ends "uncaught exception..." message   the service instance remain suspended until administratively resumed or terminated. if resumed instance continue last persisted state , may re-throw same unexpected exception. inner exception: value cannot null. parameter name: val   this thrown directly on construct shape(construct exception). if add expression shape right between construct , send ; , add valid statements there (like system.diag....eventlog..write etc) never above error   looks orchestration trying send constructed message before constructed.   any pointers? first, read article charles young http://geekswithblogs.n

ccrewrite error in windows phone 7 project

hi i've wp7 project code contracts in it.  project has code contract configuration set follows :- true      - perform runtime contract checking (full) true      - perform static contract checking true      - check in background true      - show squiggles assembly mode set 'standard contract requires' , contract reference assembly set 'build' ccrewrite throws 'object reference not set instance of object' exception , exists code -1 if set 'perform runtime contract checking' false compiles fine.  unfortunately though, vs2010 breaks on every single contract.requires statement. any ideas on cause/solution? thanks richard should have mentioned i'm running version 1.4.30903.0 DevLabs  >  Code Contracts

Showing advanced statistics for Custom Metrics (min/max/median)

in test project i'm able add custom metrics can view charts average value. (tested today on new azure portal https://portal.azure.com ) i see min/max value, median or specify ranges myself. is possible? friedo we have ability see min/max/average , later we'll have ability @ percentiles. in meantime can add custom property called "bucket" or name want , set value of bucket based on range of metric e.g. bucket = "<10" , bucket = "11 - 50" , bucket = ">50".  can segment property. ketan ghelani [msft] Visual Studio Development  ,  Visual Studio Team Foundation Server  >  Application Insights (AI)

problem with textbox.focus()

        private void button1_click(object sender, eventargs e)         {             if (textbox1.focus())             {                 textbox1.text = textbox1.text + 1;             }             else if ( textbox2 .focus())             {                  textbox2 .text =  textbox2 .text + 1;             }         } how come everytime click button1, it's add "1" textbox1 though focus on textbox2?  hi this because focus() set focus textbox. instead use following  private void button1_click(object sender, eventargs e)         {             if (textbox1.focused==true)             {                 textbox1.text = textbox1.text + 1;             }             else if (textbox2.focused == true)             {                 textbox2.text = textbox2.text + 1;             }         } sampada Visual Studio Languages

[WP 8.1 Universal]Regarding Application Insights in Windows Phone 8.1 application

Image
when try add application insights connected service project , saying  , current project not supported. like shown in below image. in spite  have added references project. when run application , insights being noted / notified not shown on azure portal, had give required data instrumentation key etc.. mohan rajesh komatlapalli since vs showing events being captured, next step check a few things: are events being transmitted?  use fiddler, , outbound requests dc.services.visualstudio.com.   data being sent ai sdks.  if requests being sent (responses 200's) should see data in portal. verify instrumentation key using in project matches 1 looking @ in azure portal.  every once in while switch resource sending data to, , others looking @ different resource in azure expecting see data.  verify that. verify there no outages/etc ai itself.  see http://aka.ms/aistatus , make sure isn't coincidence there's delay in processing.

Create BaseClass and Base Entity Type

i have base class derive several other classes from. public interface someclass : baseclass and have repo class has generic methods save, getbyid(int), getall() the return type of getallmethod() of baseclass i.e public list<baseclass> getall() i getting error saying should this public list<someclass> getall but thought someclass , baseclass same thing? long someclass derived baseclass use base object derived baseclass work methods?? what missing???? public interface ibaserepository { void save(); list<ibaseentity> getall(); ibaseentity getbyid(int id); } public interface ibaseentity { } public class planrepository : iplanrespository { public void save() { throw new notimplementedexception(); } public list<plan> getall() { throw new notimplementedexception(); } public plan getbyid(int id)

.net CORE 1.0 won't install on VS 2015 w/Update 3

just updated vs 2015 update 3. completed successfully. tried install .net core 1.0.0, failed, saying update 3 didn't appear finish , repair it.  if rerun update 3, there not repair option , install looks fine me. the last 2 lines of core log file this: [06f0:0418][2016-07-22t16:19:13]e000: setup has detected visual studio 2015 update 3 may not installed. please repair visual studio 2015 update 3, install product again. [06f0:0418][2016-07-22t16:19:13]e000: error 0x81f40001: bundle condition evaluated false: wixbundleinstalled or not(((vs2015communityupdateversion <> vs2015updateversion) , (vs2015communityexists) , (vs2015updateversionexists)) or ((vs2015professionalupdateversion <> vs2015updateversion) , (vs2015professionalexists) , (vs2015updateversionexists)) or ((vs2015enterpriseupdateversion <> vs2015updateversion) , (vs2015enterpriseexists) , (vs2015updateversionexists)) or ((vs2015webexpressupdateversion <> vs2015updateversion) , (vs2015web

How to add a new column in a excell worksheet programatically

i have  excell worksheet has 2 columns , b. now want when user click on button in application new colum c should added worksheet if excel file in xlsx format, can use closedxml : http://closedxml.codeplex.com/ . marco minerva [mcpd] blog: http://blogs.ugidotnet.org/marcom twitter: @marcominerva Visual Studio Languages  ,  .NET Framework  >  Visual C#

Trying to make sure I understand locking correctly

so far i've used locking in simple way, i'm trying optimize code performance , need make sure of things. supposedly have example locking code defined here: http://msdn.microsoft.com/en-us/library/c5kehkcz%28v=vs.71%29.aspx (account balance cannot go negative). but, following alterations: (questions below) class balanceentry { public int value; } class account { dictionary<int, balanceentry> b = new dictionary<int, balanceentry>(); public account( int initial ) { b.add( 0, new balanceentry() ); b[0].value = initial; } int withdraw1( int amount ) { lock ( ) { // code ... } } int withdraw2( int amount ) { lock ( b ) { // code ... } } int withdraw3( int amount ) { lock ( b[0] ) { // code ... } } } if there 3 different threads called withdraw1, withdraw2 , withdraw3 @ same time, lock wouldn't work, cor

API Error: Cannot modify data for this customer, as it is under migration

hi,  we seeing more of recently. com.matchcraft.rip.searchengine.microsoft.adcenterexception: axisfault faultcode: {http://schemas.xmlsoap.org/soap/envelope/}server faultsubcode: faultstring: invalid client data. check soap fault details more information faultactor: faultnode: faultdetail: {https://adcenter.microsoft.com/v7}apifaultdetail:<trackingid xmlns="https://adapi.microsoft.com">10a858f9-53fc-4759-a1cb-1eeef0b31647</trackingid><batcherrors/><operationerrors><operationerror><code>2928</code><details i:nil="true"/><errorcode>campaignservicecustomerdatabeingmigrated</errorcode><message>cannot modify data customer, under migration.</message></operationerror></operationerrors>   -kevin     hello knguyen@mc , i've been notified support working on open ticket them. please let know if should require further assistance. thanks! :-)

Need tips no best way of creating a toolbar

hi! i've gotten pretty close blend , i'm trying create nice user interface. i've gotten far toolbar , want create sort of mix between standard word 2003 toolbars , blends left side buttons. that make blends toolbar, horizontal. now, can imagine , everything. thing is, can't seem wrap head around how in best way. just provided simple image of idea want ( know it's blend , it's photoshopped make clear want) http://img181.imageshack.us/img181/4880/66286278hs8.jpg how this? know create grid inside row example. , throw in stack panel or in there. icons each button etc? need create 1 custom button resource each button? or create say, left button, middle button , right button , throw on icon or something? work either it? since can't add icon button in blend. hope understands problem. expression blend created in blend wasn't it? how did create toolbars? hi kenny bones, i believe consistency key in designing guis, if design buttons icons similar toolbar of exp

Generate EDIFACT NACK (Negative CONTRL)

hi   i wondering how negative contrl generated biztalk. if source edifact well-formed biztalk generates contrl uci4='7' in case of, example, wrongly formatted date process suspended , no contrl generated (shouldn't biztalk generate negative contrl routing sender)? kind regards allan hi thx replay i solved yesterday testing different options. found out technical ack 1 validating una , unb segments , generate uci=4 if there syntax errors.   kind regards allan   BizTalk Server  >  BizTalk Server EDI and AS2

dataReader + For Loop

my database debtor             opening           debit               credit james                   100                  20                      0 james                   100                  10                      0 james                  100                    0                       5 mr. j                      50                  0                        10   i want calculate balance of debtor. formula: new opening: opening+ debit - credit . example, james: 125 = 100 + 20 + 10 - 5 result customer       opening james               125 mr. j                  40 this code working with, keep failed me =( i wanted use loop inside while read, dun know keyword find datareader's rows.      string connectionstring = "provider=microsoft.jet.oledb.4.0;data source=" + this .lbldatabasedir.text + ";jet oledb:database password=password" ; system.data.oledb.oledbconnection conndebtor = new system.data.oledb.oledbconnection(connections

How Do I write individual strings, booleans, integers, images, audio files, video files, etc. to a .zip file using DotNetZip?

i'm trying rewrite c# .net winforms app uses filestream , binarywriter write individual items binary file , filestream , binaryreader read them binary file. i'm thinking using donetzip write items .zip file instead. here's how wrote them filestream/binarywriter:         private void writetobinary(string filepath)         {             filestream fs = new filestream(filepath, filemode.create, fileaccess.write);             binarywriter bw = new binarywriter(fs);             bw.write(somestring);             bw.write(someinteger);             bw.write(someboolean);             bw.write.(somejpgimageinbase64string();             bw.write(somemp3inbase64);             fs.close();             bw.close();         } here's i'd do:         private void zipitall(string filepath)         {             create new instance of ionic.zip or other zip method;             add somestring it;             add someinteger it;

v4050 274 Healthcare Provider Information

according postings we've seen, non-hipaa standard v4050 274 schema available biztalk server 2006 r2.  however, after intalling r2 beta, unable locate 274 schema.  274 supported in r2?  if so, available beta release, or have wait production release? there x12 4050 274 schema in current release (beta 2) of product. must install development tools in order self-extracting zip file microsoftedixsdtemplates.exe in xsd_schema folder in biztalk program directory. once extracted see x12 directory in folder , in x12 directory see separate folders schemas various x12 versions in them. in 00405 folder find schema 274 document. BizTalk Server  >  BizTalk Server General

WCF BasicHttp Sendport and empty SOAP action

Image
hi we have integrate soap service uses empty soap action (""). how can call service using biztalk? once leave action field blank in send port configuration, biztalk not sending soap action. if enter "" in action field, biztalk sends """".... do have suggestions? regards hi mrks83, as per w3c notes : “ the soapaction attribute specifies value of soapaction header operation. uri value should used directly value soapaction header; no attempt should made make relative uri value absolute when making request. http protocol binding of soap , value required (it has no default value). other soap protocol bindings, must not specified, , soap:operation element  may be omitted. ” in . net , soapaction generated you. explicitly make empty below code, in . net think can services empty soapaction.. [operationcontract(action = "")] public void donothing() { } did try following soap action header in send port:

IIS 6 hangs and needs to be restarted.

iis 6 running on windows server 2003, stopped working twice in last 2 days.  have no idea why.  iis log file did not have info help.  @ least think it's iis.  web services hang , restarting iis fixes problem.   any ideas?   thank much.   mark this not the forum iis issues. if still problem you, should ask at  http://forums.iis.net/ . use file->new project create web service projects Archived Forums A-B  >  ASMX Web Services and XML Serialization

How to print a pdf with C sharp code

hi, working on creating pdf fetch few images computer and text based on calculation in c sharp code. how can have control on formatting of page , tools require make work. have no idea how start on this. appreciated. thanks. you can use itextsharp , create pdf document. http://sourceforge.net/projects/itextsharp/ "if there's nothing wrong me, maybe there's wrong universe!" Visual Studio Languages  ,  .NET Framework  >  Visual C#

How to convert numeric to COBOL binary format? [S9(04) Binary]

hi,   i creating copybook file in c# , sent mainframes. the format type in mainframe s9(04) binary    i have pass value between 00 99, want convert numeric value s9(04) binary    please me above conversion on 10/10/2011 1:51 pm, suby_nsm wrote: > hi, > > creating copybook file in c# , sent mainframes. > > format type in mainframe s9(04) binary > > have pass value between 00 99, want convert numeric > value s9(04) binary > > please me above conversion >   so there program running on mainframe that's accepting data. why can't program accept data string and let mainframe program convert string cobol s9(4) binary?   Visual Studio Languages  ,  .NET Framework  >

web services Exception

hello, attempting complete web services application.  can not seem "see" method , receive error  when attempt view ".asmx" page in browser.   able point me in direction of solution? system.xml.linq.xdeclaration cannot serialized because not have parameterless constructor. description: an unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: system.invalidoperationexception: system.xml.linq.xdeclaration cannot serialized because not have parameterless constructor. can put of sample code of asmx? the error says xdeclaration cannot serialized.  you need remove fields passed through class xdeclaration. resolving n evolving in c# (http://jeanpaulva.com) Visual Studio Languages  , 

Azure Search - I am getting error when using suggestions with Search

hi, i getting error when using search suggestions. below code snippets using. var definition = new index() { name = _indexname, fields = new[] { new field { name = "productid", type = "edm.string", iskey = true, issearchable = false, isfilterable = false, issortable = false, isfacetable = false, isretrievable = true }, new field { name = "name", type = "edm.string", iskey = false, issearchable = true, isfilterable = false, issortable = true, isfacetable = false, isretrievable = true,analyzer= "standardasciifolding.lucene" }, new field{ name = "productnumber", type = "edm.string", iskey = false, issearchable = true, isfilterable = false, issortable = false, isfacetable = false, isretrievable = true}, new field{ name =

Interaction.Shell return file not found when the input file has a Japanese character

i using   interaction.shell(command, appwinstyle.hide, true, -1) convert image pdf here command  command - c:\convert.exe c:\cの化.jpg c:\test.pdf but getting file not found error when executing this. can please comment hi, i not have experience japanese characters. if understood correctly, unicode character inside ntfs filenames. http://msdn.microsoft.com/en-us/library/windows/desktop/dd317748(v=vs.85).aspx usefull you. so kind of application convert.exe using? read far problem should convert.exe expects fat encodings. not sure if helped @ all. unable find resources on possible name conversions. 1 thing goes through mind old 8.3 filenames. should compliant old fat rules. maybe thread @ http://social.msdn.microsoft.com/forums/en-us/netfxbcl/thread/c9f5db73-3ddd-4be3-974e-64ecf5f9c4a3/ helpfull call of getshortpathname. with kind regards, konrad Visual Studio Languages

Issues deploying web and api projects to 2 separate sites

i have 2 projects so: root web.sln ...web     /mvc/mvc.csproj ...services     /api/api.csproj     /api.sln i created custom deploy command so: the mvc site deploying no problem, api site failing error message: an unknown error has occurred. check diagnostic log details. any ideas what's wrong? @if "%scm_trace_level%" neq "4" @echo off :: ---------------------- :: kudu deployment script :: version: 0.1.13 :: ---------------------- :: prerequisites :: ------------- :: verify node.js installed node 2>nul >nul if %errorlevel% neq 0 ( echo missing node.js executable, please install node.js, if installed make sure can reached current environment. goto error ) :: setup :: ----- setlocal enabledelayedexpansion set artifacts=%~dp0%..\artifacts if not defined deployment_source ( set deployment_source=%~dp0%. ) if not defined deployment_target ( set deployment_target=%artifacts%\wwwroot ) if not defined next_manifest_path (

Toggle Full Screen Button in Sketchflow Project

hi,   i want include fullscreen toggle button (i.e. activating browser fullscreen mode) in sketchflow demo client. i total newb though need step step guide on how (i've looked online while not found simple enough). would of kind fellows able help?     oh ok....  then: private void go( object sender, system.windows.routedeventargs e) { application.current.host.content.isfullscreen = !application.current.host.content.isfullscreen; }   Expression  >  Expression Blend + SketchFlow

Blend 3 Trial expired first time run

i started book "accelerated silver light3". downloaded blend_trial_en.exe file , installed blend 3. first time ran blend 3, said trial period has expired. clicked on link "get free beta key on-line" but link broken microsoft server took me default page link options purchase pages. there way trial before lay out $700 ? thanks david canjuncook apparently, blend_trial_en.exe not latest. downloaded expressionstudio_trial_en.exe , appears to work ok, @ least far getting past license diaglog. canjuncook Expression  >  Expression Blend + SketchFlow

Limit user to application

i looking new features in 2016 , came across row level security. i have wanted limit access on users within application or reporting services. not want users able access other predefined accesses built queries. in other word when work within limits of our application, granted full access limited application. no access should permitted when working ad-hoc via other tool.  applications access specific database, run cross database queries well. use synonyms access outside of main db db may on server. can row level security me place limits on external db access , how implement this? ??? we have 3-tier application. users login , verified ad. business web server connects db via sql user unknown users. calling server web server. problem the db server sees web user , cannot control permission having trust application manage security user. love add groupings users defines areas , allow data within area visible users. you use row-level security based on application name, si

Upload Video and Preview it in my Silverlight Application

i want in silverlight web site use control upload video , save , want give user option view uploaded video .. want know if there ready made control view video in web site or build own control , if body uploaded project in web site same feature please attach hello, there inbuilt control in silverlight called mediaelement can use viewing video on website. but have create toolbar control in video behavior while playing in website. by video behavior mean play,pause,volume control,full screen,fast forward , rewind , such functionality. if want give functionality in videoplayer have create toolbar videoplayer. regards, parth pandya. Silverlight  >  Silverlight Video and Media

Pass a C# property name as a parameter to an utility class method

is possible pass property of class method (outside of class) , retrieve property's description? for example: public class foo { [description("tells whether true or not.")] public bool someflag; public dosomethingneat() { myutility.getdescription(someflag); } } and pseudo-code in utility class: public static class myutility { public static string getdescription(??? property) { return property.description; } } suppose might necessary additionally pass type property belongs to. gaea.  i cooked same thing earlier.  might post confirmation idea of using expression reasonable way of identifying member access @ compile time (as opposed string.) the function "getdescription" gets description of member accessing in given lambda expression. using system; using system.componentmodel; using system.linq.expressions; public class foo { [description( "the first property." )] public int property1; [

multiline tables in blend

hi all,   how can multiline tables in expression blend ?  multiline means each cell of line has multiple entries (bit table in table) example: http://www.java2s.com/tutorial/javaimages/multiplelinepertableitem.png   any ideas how can accomplished in blend ?   thanks! jae you want use datagrid control.   examples sl: http://www.c-sharpcorner.com/uploadfile/mahesh/sldatagrid05032009223331pm/sldatagrid.aspx Expression  >  Expression Blend + SketchFlow

an atomic scope may not contain or call a service or scope that contains both the send and the corresponding receive of a requestresponse operation on a 'uses' port or servicelink

i have atomic orchestration , calling orchestration in same have call/ consume web service. when trying build solution, getting below error. “an atomic scope may not contain or call service or scope contains both send , corresponding receive of requestresponse operation on 'uses' port or servicelink”   is possible call/ consume web service atomic scope transaction? please advise,   thanks. hi, yes, error if orchestration transaction type set atomic. cannot have both send- , receive shapes request-response port in same atomic scope, scope shape or inside orchestration marked atomic. because atomic scopes, biztalk needs guarantee acid properties transactions, means messages sent out in atomic shape not released send port until atomic shape has finished. otherwise messages might end @ receiver , transaction can fail later on. if message send port not released until atomic shape finished, naturally means cannot have receive shape in atomic scope, since there nev

How to Detect Lync 2013 web plugin (LWA) installed with javascript?

Image
hello everyone, we want make web page check if user have web plugin (lwa) join conferences... before automatically signing him. (this why want check first) if not understand me try spanish :) right have this... not working "automation server can't create object" message. i'm expecting message if client don't have the plugin but always... if machine have plugin installed. pluginloader.prototype._createplugin = function() { if (this._clsname) { try { if (this._isie) { this._plugininstance.object = new activexobject("microsoft.lwaplugin15.7.inproccomponentfx"); } else { this._plugininstance.object = null; } } catch( ex ) { // error creating activex object. //alert(ex.tostring()); } .... } and client have installed lwaplugin... :( if not unders

Help with strings and lists.

hello! i´m  createing program , internally uses list < > instead of an array. input come text box , should possible insert  decimal numbers until user enters 0.0 input. then, the highest , lowest , average printed out - button making possible begin enter numbers again . now problem. have completed, think, needed methods calculating highest, lowest , average. my problem not know how continue! thanks! victor. edit. sorry swedish, here clarifications. medelvärde = average, högsta = highest, lägsta = lowest namespace uppgift5._5 { public partial class form1 : form { public form1() { initializecomponent(); } private double medelvärde(list<int> lista) { int total = 0; double average; foreach (int resultat in lista) { total += resultat; } average = (double)total / lista.count; return av

Last-mile security with OAuth-enabled APIs

what recommended approach last-mile security (between apim proxy , back-end services) apis protected using oauth 2.0? seems options are: on api -> security tab, configure proxy authentication "none",  and use ip white-listing ensure apim proxy can communicate back-end service (which must available on public internet).  this approach requires static ip apim available in standard tier (thus more expensive while in development). on api -> security tab, configure proxy authentication "none", , use shared secret approach, involves using secret, publisher-defined key/value pair in request header coming apim (with special code on back-end verify incoming value).  the drawback approach is less-formal mechanism requires process around regularly rotating secret value. on api -> security tab, configure proxy authentication "mutual certificates", , specify client certificate in dropdown.  the drawback approach managing cert itself. "basic a

Keyword and Keyword Error types in V9 BulkService

hi all, so trying decypher keyword , keyword error relationship in csv download - have following presented me. all these same keyword id , appear in csv 1 after other follows type                    status    id      ed status        ed loc'n   ed term   ed r'code    ed appstatus keyword             active      100   activelimited                                                      appealable keyword error    deleted   100 keyword error    active      100                          keyword   xxxx        17 does mean keyword id 100 deleted, or waiting appeal or else? many in advance giles bodger  hi, giles. for each record, what values in the publisher countries, error, , error number fields? still see keyword in bing ads web application? keyword added or updated? i should also suggest escalate support file including actual keyword identifier. support repro , investigate history of specified keyword, needed. thank you.

C# 2010 app

i need take main parts of c# 2008/2010 console application , turn thin client web in visual studio 2010. describe current c# 2008/2010 application , describe 'new version (clone) of 'second' program. the current application , not modified following:  1. driver program (c# 2010 desktop/console) calls 'second' program parameters needs particular run. 1.the second program calls web service supported company upload , download documents web service.   'new version (clone) of 'second' program:  2. new version of 'second'program listed above following: a. user access c# 2010 web form page enter client number, point directory path of files located need uploaded web service, , click submit button, b. web app use 'existing code' copies progam listed above load documents web service , receive repsonse fromn web service.   kknow how complete following tasks:  1.how setup c# 2010 web form scratch? code point web server or pe

Catalog Staging

when staging catalog there interruption in availability of catalog on target server?   i see reference in documentation under synchronizing web farms says: "you should synchronize web farm during off-peak hours minimize disruption in run-time operations." i don't see explanation of these disruptions or types of staging apply to. if have thousand skus need staged or more import apis don't have throttling feature blast database doing crud operations.   so means should perform staging off-peak hours don't tax database.   -max Commerce Server  >  Commerce Server 2007

Iterate a Dictionary - best way

i using following way iterate dictionary foreach (keyvaluepair<string,string> entry in dict) { } there other ways iterate? you can use linq - planning "entry" elements?   for example, if wanted values keys started "f", in one-liner using linq:      var matches = dict.where(kvp => kvp.key.startswith("f")).select(kvp => kvp.value); reed copsey, jr. - http://reedcopsey.com if post answers question, please click " mark answer " on post , " mark helpful ". Visual Studio Languages  ,  .NET Framework  >  Visual C#

Passing values from datagrid to CrystalReport

hello again; i stuck on new issue have been trying work few days now. (i can test few hours day) i originally asked how pass values data grid text box on different form , guys helped me working. (thanks!) since found out, printing "form" not practical , overall pretty messy. after more reading found out crystal report. read on it, got installed , set .rpt invoice way wanted it. issue same before, how pass values of selected row of datagrid invoice. feel close in every step take, can't seem work.  so sum up. i have datagrid using data binding source called"clientinfobindingsource4" my crystal report using sql database @ "billy-pc\sqlexpress.sampledb.dbo" ps private void button2_click(object sender, eventargs e) { if (clientinfobindingsource4.current != null) { datarow dr = ((datarowview)this.clientinfobindingsource4.current).row;

Why i'm getting exception IOExceptiob: The process cannot access the file....because it is being used by another process ?

public list<string> lockedthreads(string filename) { string fname = "http://rotter.net/cgi-bin/forum/dcboard.cgi?az=list&forum=scoops1&mm=3&archive="; uri uri = new uri(fname); string str = ""; using (webclient client = new webclient()) { client.headers.add(httprequestheader.contenttype, "charset=windows-1255"); str = client.downloadstring(fname); client.downloadfileasync(uri, @"c:\temp\scoopstest\scooptest.html"); } filename = @"c:\temp\scoopstest\scooptest.html"; string t1 = ""; list<int> numberoflines = new list<int>(); list<string> lockedthreads = new list<string>(); list<string> lockedlinks = new list<string>(); string[] lines = file.readalllines(filename