Process.Start(奇怪的问题)

时间:2015-05-09 22:15:49

标签: .net internet-explorer

这里有点奇怪。我有非常长的网址,而且工作正常"当"我直接将其粘贴到Internet Explorer的地址栏:

http://maps.googleapis.com/maps/api/staticmap?size=640x640&scale=2&maptype=hybrid&sensor=false&path=color:0xff0000ff|weight:5|40.262043212854,28.9574884865954|40.2620393471008,28.9577391646903|40.2620333177299,28.9581300766863|40.261331625691,28.9581449735233|40.2613229341457,28.9575062426388|40.262043212854,28.9574884865954&markers=color:blue|label:0|40.262043212854,28.9574884865954&markers=color:blue|label:1|40.2620393471008,28.9577391646903&markers=color:blue|label:2|40.2620333177299,28.9581300766863&markers=color:blue|label:3|40.261331625691,28.9581449735233&markers=color:blue|label:4|40.2613229341457,28.9575062426388&markers=color:blue|label:5|40.262043212854,28.9574884865954

当我尝试使用" Process.Start(" iexplore.exe",...")尝试调用相同的URL时,我得到一个错误的对话框资源无法下载。我试试这个并得到错误:

System.Diagnostics.Process.Start("iexplore.exe", "http://maps.googleapis.com/maps/api/staticmap?size=640x640&scale=2&maptype=hybrid&sensor=false&path=color:0xff0000ff|weight:5|40.262043212854,28.9574884865954|40.2620393471008,28.9577391646903|40.2620333177299,28.9581300766863|40.261331625691,28.9581449735233|40.2613229341457,28.9575062426388|40.262043212854,28.9574884865954&markers=color:blue|label:0|40.262043212854,28.9574884865954&markers=color:blue|label:1|40.2620393471008,28.9577391646903&markers=color:blue|label:2|40.2620333177299,28.9581300766863&markers=color:blue|label:3|40.261331625691,28.9581449735233&markers=color:blue|label:4|40.2613229341457,28.9575062426388&markers=color:blue|label:5|40.262043212854,28.9574884865954");

请注意,解码/编码URL对消除错误没有影响。

这里有什么问题?

更新/编辑:当我尝试" Process.Start"使用" firefox.exe"除了上面的相同网址,它就像一个魅力。如果我缩短链接甚至喜欢这样,我仍然使用Process.Start + IE得到错误:

System.Diagnostics.Process.Start("iexplore.exe", "http://maps.googleapis.com/maps/api/staticmap?&size=640x640&scale=2&maptype=hybrid&sensor=false");

我真的迷失了。

0 个答案:

没有答案