我在Mono之上使用ASP.NET MVC5似乎Owin OAuth为虚拟路径抛出404(在我的情况下,import java.io.File;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class Saxon {
/**
* Simple transformation method.
*
* @param sourcePath
* - Absolute path to source xml file.
* @param xsltPath
* - Absolute path to xslt file.
* @param resultDir
* - Directory where you want to put resulting files.
*/
public static void simpleTransform(String sourcePath, String xsltPath,
String resultDir) {
TransformerFactory tFactory = TransformerFactory.newInstance();
try {
Transformer transformer = tFactory
.newTransformer(new StreamSource(new File(xsltPath)));
transformer.transform(new StreamSource(new File(sourcePath)),
new StreamResult(new File(resultDir)));
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
// Set saxon as transformer.
System.setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
simpleTransform("result1.xml", "defaultfrontend.xslt", "output.html");
}
}
和/signin-facebook
。我&#39 ;我在我的Mac上使用Xamarin和Mono。我试图在虚拟机内的Visual Studio中运行相同的代码并且它正常工作。尽可能地,我不想使用Windows。(Mac是我指定的工作机器,因此移动到PC将无法工作)
任何人都遇到过同样的错误?任何导致从哪里开始寻找将非常感激。
更新(附截图):