我通过 FTP 发布了一个 .NET Core Web API。
默认情况下,某些方法不起作用(放置和删除),因为服务器默认启用了 WebDAV。
要删除它,在发布应用程序后,我必须手动转到 FTP 上的 web.config 并添加以下行
<modules runAllManagedModulesForAllRequests="false">
<remove name="WebDAVModule" />
</modules>
Run Code Online (Sandbox Code Playgroud)
如何将其设置为自动删除- 我假设通过 Startup.cs
这是功能:
function initializeMap(){
var LatLng = {lat: 20.23, lng: -8.28460};
var mapOptions = {
center: LatLng,
zoom: 6,
scrollwheel:false
}
var map = new google.maps.Map(document.getElementById('map'), mapOptions);
var marker = new google.maps.Marker({
position: LatLng,
map: map,
draggable: true,
title: "Binko"
});
var input = document.getElementById('accommodation_address');
var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds',map);
google.maps.event.addListener(autocomplete, 'place_changed',function(){
var place=autocomplete.getPlace();
if (!place.geometry){
return;
}
if (place.geometry.viewport) {
map.fitBounds(place.geometry.viewport);
} else {
map.setCenter(place.geometry.location);
map.setZoom(17);
}
marker.setPlace( ({
placeId: place.place_id,
location: place.geometry.location
}));
});
};
google.maps.event.addDomListener(window, 'load', initializeMap); …Run Code Online (Sandbox Code Playgroud)