ASP.NET에서 가장 좋지 않지만 인증 백엔드 및 RESTful 웹 API 용으로 사용하고 있습니다. C#으로 위험 할 정도로).ASP.NET - Visual Studio에서 시작할 때 HTML 페이지가 다르게 보이고 외부에서 시작됨
나는 HTML, CSS 및 JS로만 구성된 웹 사이트를 운영하고 있습니다. 인기있는 브라우저 (chrome, IE, firefox)로 직접 시작했을 때 바깥 쪽은 환상적입니다. 이 웹 사이트 내에서 ASP.NET의 기능 중 일부를 사용하여 웹 응용 프로그램의 프런트 엔드로 만들고 싶습니다. 간단히 끌어서 HTML, CSS 및 JS 폴더 (모든 이미지 포함)를 내 ASP.NET 프로젝트에 놓았으며 Visual Studio에서 브라우저로 미리 볼 때 전체 HTML 레이아웃이 왜곡되어 모든 것이 제대로 표시되지 않습니다. 똑같아.
권한이없는 사용자가 Web.config의 페이지, css 폴더 및 js 폴더에 액세스 할 수있는 권한을 추가했습니다.
왜 이런 일이 발생하는지 알고 싶습니다. ASP.NET은 브라우저를 통해 직접 보는 것보다 빌드하는 동안 HTML/CSS를 다르게 렌더링합니까?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Site Name » Awesome Tagline Here</title>
<link rel="stylesheet" href="css/base.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/red.css" type="text/css" media="all" />
<link rel="shortcut icon" type="image/x-icon" href="css/images/favicon.ico" />
<script src="js/modernizr.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/colorbox.js" type="text/javascript"></script>
<script src="js/flexslider.js" type="text/javascript"></script>
<script src="js/livevalidation.js" type="text/javascript"></script>
<script src="js/twitter.js" type="text/javascript"></script>
<script src="js/easing.js" type="text/javascript"></script>
<script src="js/functions.js" type="text/javascript"></script>
</head>
<body>
<section id="wrapper">
<section class="shell">
<!-- Header -->
<header>
<h1 id="logo"><a href="home.html" class="notext">Name Of site</a></h1>
<nav>
<ul class="main-nav">
<li class="current"><a href="home.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li>
<a href="services.html">Services</a>
<ul>
<li><a href="services.html">Service Page 1</a></li>
<li><a href="services.html">Service Page 2</a></li>
<li>
<a href="services.html">Service Page 3</a>
<ul>
<li><a href="services.html">Service Page 1</a></li>
<li><a href="services.html">Service Page 2</a></li>
<li><a href="services.html">Service Page 3</a></li>
<li><a href="services.html">Service Page 4</a></li>
</ul>
</li>
<li><a href="services.html">Service Page 4</a></li>
</ul>
</li>
<li><a href="projects.html">Projects</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<ul class="socials">
<li class="facebook"><a href="#">Facebook</a></li>
<li class="twitter"><a href="#">Twitter</a></li>
<li class="rss"><a href="#">RSS</a></li>
</ul>
</nav>
</header>
<!-- End Header -->
</section>
<section id="large-slider">
<ul class="slides">
<li>
<img src="css/images/home-slide1.jpg" alt="" />
<section class="text">
<h1><span>Ma quande</span> lingues coales</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim.</p>
<a href="#" class="button">View More</a>
</section>
</li>
<li>
<img src="css/images/home-slide2.jpg" alt="" />
<section class="text">
<h1><span>Ma quande</span> lingues coales</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim.</p>
<a href="#" class="button">View More</a>
</section>
</li>
<li>
<img src="css/images/home-slide3.jpg" alt="" />
<section class="text">
<h1><span>Ma quande</span> lingues coales</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim.</p>
<a href="#" class="button">View More</a>
</section>
</li>
<li>
<img src="css/images/home-slide1.jpg" alt="" />
<section class="text">
<h1><span>Ma quande</span> lingues coales</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim.</p>
<a href="#" class="button">View More</a>
</section>
</li>
</ul>
</section>
<section class="shell">
<section class="about-row">
<h2 class="section-head"><a href="about.html" class="more">More Info</a> <span><span>More</span> About Us</span></h2>
<section class="thumbs">
<img src="css/images/th-about1.jpg" alt="" />
<img src="css/images/th-about2.jpg" alt="" />
<img src="css/images/th-about3.jpg" alt="" />
<img src="css/images/th-about4.jpg" alt="" />
</section>
<section class="text">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut</p>
</section>
</section>
<section class="projects-row">
<h2 class="section-head"><a href="projects.html" class="more">More Projects</a> <span><span>Latest</span> Projects</span></h2>
<ul class="thumbs">
<li>
<a href="project.html"><img src="css/images/th-home1.jpg" alt="" /></a>
<h4>Lorem ipsum dolor <span>sit amet</span></h4>
<p><a href="#">CASE STUDIES</a> <span>/</span> <a href="#">Entertainment</a> <span>/</span> <a href="#">Featured</a> <span>/</span> <a href="#">Website</a></p>
</li>
<li>
<a href="project.html"><img src="css/images/th-home2.jpg" alt="" /></a>
<h4>Lorem ipsum dolor <span>sit amet</span></h4>
<p><a href="#">CASE STUDIES</a> <span>/</span> <a href="#">Entertainment</a> <span>/</span> <a href="#">Featured</a> <span>/</span> <a href="#">Website</a></p>
</li>
<li>
<a href="project.html"><img src="css/images/th-home3.jpg" alt="" /></a>
<h4>Lorem ipsum dolor <span>sit amet</span></h4>
<p><a href="#">CASE STUDIES</a> <span>/</span> <a href="#">Entertainment</a> <span>/</span> <a href="#">Featured</a> <span>/</span> <a href="#">Website</a></p>
</li>
<li>
<a href="project.html"><img src="css/images/th-home4.jpg" alt="" /></a>
<h4>Lorem ipsum dolor <span>sit amet</span></h4>
<p><a href="#">CASE STUDIES</a> <span>/</span> <a href="#">Entertainment</a> <span>/</span> <a href="#">Featured</a> <span>/</span> <a href="#">Website</a></p>
</li>
</ul>
</section>
<section class="clients-row">
<h2 class="section-head"><a href="#" class="more">View More</a> <span><span>Our</span> Clients</span></h2>
<ul>
<li><a href="#"><img src="css/images/client1.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client2.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client3.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client4.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client5.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client6.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client7.png" alt="" /></a></li>
<li><a href="#"><img src="css/images/client8.png" alt="" /></a></li>
</ul>
</section>
<section class="row">
<section class="half">
<h2 class="section-head"><span><span>We</span> Hire</span></h2>
<h4>SALES MARKETING CONSULTANT</h4>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. <a href="#">More</a></p>
<h4>ART DIRECTOR</h4>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. <a href="#">More</a></p>
</section>
<section class="half">
<h2 class="section-head"><span><span>Our</span> Services</span></h2>
<ul class="left">
<li><a href="services.html">Advertising</a></li>
<li><a href="services.html">Brand Identity Design</a></li>
<li><a href="services.html">Business Planning</a></li>
<li><a href="services.html">Startup Planning</a></li>
<li><a href="services.html">Campaign Planning</a></li>
</ul>
<ul class="right">
<li><a href="services.html">Online Advertising Services</a></li>
<li><a href="services.html">Website Architecture Design</a></li>
<li><a href="services.html">Interactive Design</a></li>
<li><a href="services.html">Game Design</a></li>
<li><a href="services.html">Development</a></li>
</ul>
</section>
</section>
<h2 class="bottom-text">“Eat your <strong>betting money</strong>, but don't bet your <strong>eating money</strong>.”</h2>
</section>
<section id="footer-push"></section>
</section>
<!-- Footer -->
<footer>
<section class="shell">
<section id="to-top">
<a href="#">Up</a>
<span class="overlay"></span>
</section>
<section class="twitter-feed">
<h5>Latest Tweets</h5>
<section id="tweets"></section>
</section>
<section class="about-box">
<h5>Tested on All Browsers</h5>
<p>Find out more theme features <a href="#">Here</a></p>
<img src="css/images/browsers.png" alt="" />
</section>
<section class="contact-box">
<h5>Get in Touch</h5>
<ul>
<li><span class="small">email.</span> <a href="#">[email protected]</a></li>
<li><span class="small">ph.</span> 655-606-105</li>
<li><span class="small">add.</span> East Pixel aBld. 99 <br /> City 9000</li>
</ul>
</section>
<section class="socials">
<ul>
<li class="facebook"><a href="#">Facebook <span>Become a fan!</span></a></li>
<li class="twitter"><a href="#">Twitter <span>Need more feed</span></a></li>
<li class="rss"><a href="#">RSS <span>Be up to date</span></a></li>
</ul>
</section>
</section>
<section id="bottom">
<section class="shell">
<p class="foot-nav">
<a href="home.html">Home</a> <span>|</span>
<a href="about.html">About</a> <span>|</span>
<a href="services.html">Services</a> <span>|</span>
<a href="projects.html">Projects</a> <span>|</span>
<a href="blog.html">Blog</a> <span>|</span>
<a href="contact.html">Contact</a> <span>|</span>
<a href="#">Bonus Pages</a>
</p>
<p>© 2012 My Company.</p>
</section>
</section>
</footer>
<!-- End Footer -->
</body>
</html>
모든 것이 액세스 가능한 것으로 보이지만 모든 것이 브라우저에서 직접 열 때와 비교할 때 아래로 이동합니다. 내 게시물을 편집하여 마크 업 및 CSS를 표시합니다. –
크롬에서 나쁜 사이트에서 마우스 오른쪽 버튼으로 클릭 한 요소를 클릭하고 "요소 검사"를 수행합니다. 좋은 사이트에서 동일한 작업을 수행하고로드되는 스타일을 비교하십시오. 일부 CSS가 누락 될 수 있습니다. –
또한 경로는 슬래시로 시작하지 않습니다. 즉, 슬래시를 요청하는 현재 페이지와 같은 디렉토리와 관련이 있습니다. 경로 앞에 슬래시를 붙여 루트와의 상대 경로를 만들어보십시오. –