51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2025|回复: 0
打印 上一主题 下一主题

[求助] 求助:.net user 在vs2010中编译,在返回到lr中的运行问题。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2012-10-16 09:17:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我的lr11+patch2,先建立。net user,在再vs2010里编辑,将dll引用进来。但是有一个xml的配置文件,在vs2010里应该是自己能找到的,但编辑完了,在lr中在进行运行,出如下的错,接下来怎么弄了呢?请教各位大侠!!

错误信息一:
Error: Failed to compile virtual user.
Notify: Script.sln(1): Solution file error MSB5014: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
Warning: Extension DotnetExtensionReplay.dll reports error -1 on call to function ExtPerProcessInitialize        [MsgId: MWAR-10485]
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.        [MsgId: MERR-10176]


错误信息二:这个错误信息是将loadrunner里的2个dll using了下。报的错。


Virtual User Script started at : 2012-10-16 09:02:23
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Error: Action.cs(20): System.ArgumentNullException: Value cannot be null.
Parameter name: str
   at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
   at System.Uri.ParseConfigFile(String file, IdnScopeFromConfig& idnStateConfig, IriParsingFromConfig& iriParsingConfig)
   at System.Uri.GetConfig(UriIdnScope& idnScope, Boolean& iriParsing)
   at System.Uri.InitializeUriConfig()
   at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException& e)
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString, UriKind uriKind)
   at System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri)
   at System.Xml.XmlUrlResolver.ResolveUri(Uri baseUri, String relativeUri)
   at System.Xml.XmlTextReaderImpl..ctor(String url, XmlNameTable nt)
   at System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt)
   at System.Xml.XmlDocument.Load(String filename)
   at WebServcieEnvoke.Util.InitConfig()
   at Script.VuserClass.Action() in D:\打印申请提交脚本3\脚本3_打印申请提交20121015\Action.cs:line 20
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.



脚本代码:
//---------------------------------------------
//Script Title        :
//Script Description  :
//
//
//Recorder Version    :
//---------------------------------------------

namespace Script
{   using WebServcieEnvoke;


    public partial class VuserClass
    {
        public int Action()
        {


          Util.InitConfig();//调用配置文件cfg.xml

                string filePath = "D:\\temp\\test.pdf";
                int secLevelValue = 0;
                string originalName = "test.pdf";
                string sqr = "qinhg";
                string pointArgVal = "14|8042-个人版";
                string printerArgVal = "21|Adobe PDF";
                string secLevel = "0,0,非密";

                WebServcieEnvoke.Service.ProcessWebServiceClient wsClient = new WebServcieEnvoke.Service.ProcessWebServiceClient();
               
                 //上传文件
                 string[] fileUploadRet = wsClient.UploadFileToServer(filePath, secLevelValue, originalName, sqr, "", "", 0, 1);
                //启动流程
                 string[] startResult = wsClient.StartProcess("qijp", "测试",
                            pointArgVal, printerArgVal, originalName + "|" + fileUploadRet[0], secLevel, "", "1", "1", "0", "1", "1", "1", "1");      




            return 0;
        }
    }
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-20 21:34 , Processed in 0.067860 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表